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. ;)
Back to basics 25 - Valid variable names
294 Solvers
Number of 1s in a binary string
3036 Solvers
544 Solvers
353 Solvers
Rounding off numbers to n decimals
1093 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!