i have used 2nd approach to code this question but…
Anonymous - May 6, 2014
i have used 2nd approach to code this question but i am getting wrong answer in test case:
No of elements in Array :5
Array:(1,5,4,7,8)
see code https://ideone.com/jmgV62
Thanks for your code mate :)