Problem 42832. Segmented number sequence
Solution Stats
Problem Comments
-
5 Comments
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.
Solution Comments
Show commentsProblem Recent Solvers15
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15369 Solvers
-
Sum all integers from 1 to 2^n
14438 Solvers
-
Find the maximum number of decimal places in a set of numbers
2627 Solvers
-
The Answer to Life, the Universe, and Everything
514 Solvers
-
Make combination of two given matrices.
52 Solvers
More from this Author45
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!