Please check test case 3, where number 7 is mistakenly skipped.
Also, number 12 in test case 4 ...
In test case 2, if x=0, should the sequence be 1:22 or completely empty?
@James: "If x = 0, integers that are the sums of any 2 or more consecutive previous elements should be omitted."
@Peng, thank you for the great catch. An illusive issue with my reference solution disrupted test cases 3 and 4. Now fixed.
How to find the position of an element in a vector without using the find function
Test if a Number is a Palindrome without using any String Operations
Clock Hand Angle 1
Number of 1s in a binary string
Create a Multiplication table matrix...
Sorting integers by their digits (Level 2)
Sorting integers by their digits (Level 1)
Increasing sub-sequence (Level 2)
Return the sequence element II
Regular polygon bounded by and bounding a circle
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office