Problem 42832. Segmented number sequence
Solution Stats
Problem Comments
-
5 Comments
Show
2 older comments
Peng Liu
on 26 Apr 2016
Please check test case 3, where number 7 is mistakenly skipped.
Peng Liu
on 26 Apr 2016
Also, number 12 in test case 4 ...
James
on 26 Apr 2016
In test case 2, if x=0, should the sequence be 1:22 or completely empty?
Peng Liu
on 26 Apr 2016
@James: "If x = 0, integers that are the sums of any 2 or more consecutive previous elements should be omitted."
HH
on 28 Apr 2016
@Peng, thank you for the great catch. An illusive issue with my reference solution disrupted test cases 3 and 4. Now fixed.
Problem Recent Solvers15
Suggested Problems
-
Convert a numerical matrix into a cell array of strings
1239 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
443 Solvers
-
293 Solvers
-
Sum the numbers on the main diagonal
536 Solvers
-
Find last zero for each column
400 Solvers
More from this Author40
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!