You have been given a function rev(x) which works as follows: It reverses a[0] to a[x] elements of a. e.g. Given array is a : 1 8 3 4 5 rev(3) will convert the array to a : 4 3 8 1 5 Use this function only (and comparison, of course) to sort given array 'a'. The only criterion is that the number of times this function is called should be minimum.
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@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.