There are numbers list starting from 1 to n,placed randomly. To sort these numbers an algorithm is used. Starting from the left, one by one; move a number in left direction until there is no greater number to the left of the number. Input: The left moves requires for each position to sort are given Output: unsorted list
Ex. Input: 0 0 1 0 3 Output: 1 4 3 5 2 Input: 0 1 2 3 4 Output: 5 4 3 2 1 How can use tree to solve this question ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---