Hi Amitava:
Could you provide an example in your problem statement? Also, as Evan says below, you should have more than one test case or it becomes a trivial matter to hard-code a particular answer.
Probably should add a couple more test cases so that silly people like me don't submit answers like this. ;)
Find the longest sequence of 1's in a binary sequence.
3377 Solvers
3119 Solvers
377 Solvers
204 Solvers
380 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!