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.
Find all elements less than 0 or greater than 10 and replace them with NaN
13136 Solvers
5868 Solvers
Get the area codes from a list of phone numbers
537 Solvers
Compute a dot product of two vectors x and y
754 Solvers
540 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!