The problem says the input is a positive integer but the first test inputs 0. In my code that caused r = 0/0 error. Please change the wording to "input is non-negative".
Find the longest sequence of 1's in a binary sequence.
3421 Solvers
934 Solvers
How many trades represent all the profit?
526 Solvers
250 Solvers
Flip the vector from right to left
2834 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!