Prasad, I enjoyed thinking through the pattern to solve this problem and the related problem. One suggestion for both is to add more test cases so that solvers cannot simply write their codes to return the answer to the single test case.
Needs more test cases.
Reverse the elements of an array
692 Solvers
214 Solvers
447 Solvers
1026 Solvers
1983 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!