sort the input array. only following operations on array is allowed:
1)get(index) -gets the element at that index
2)reverse(int start,int end) - example reverse(1,3) for the array
[1,2,3,4,5] will return [1,4,3,2,5]

better then nlogn

-- 
With Regards,
*Jalaj Jaiswal* (+919019947895)
Software developer, Cisco Systems
Final Year Undergraduate,
IIIT ALLAHABAD

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to