Hi Yogesh start and end denote the indexes where the set that is to be moved starts and ends in the given array. Destination index denotes the index in the array where the given set is to be moved. This needs some rearrangement of the array elements as shown in the example before.
Hope that clarifies. Thanks Gopi On Jul 9, 6:55 pm, Yogesh Yadav <[email protected]> wrote: > @gopi: i didnt really understand what u want to say... what start,end and > destination denotes here?? > > u said it should start with 1 but in result it is starting with 9...plz > explain ur question again.... > > > > On Sat, Jul 9, 2011 at 7:21 PM, Gopi <[email protected]> wrote: > > Hi Geeks > > > Can anyone please comment on this. > > Let me know if the problem description is not clear enough. > > > Thanks > > Gopi > > > On Jul 9, 5:36 pm, Gopi <[email protected]> wrote: > > > Write code to move a set of elements (represented by start and end > > > indexed) in an array to a given destination location (denoted by > > > destination index). > > > > For example: > > > Let say our array is {9, 7, 5, 8, 1, 5, 4, 8, 10, 1} > > > > move_set (array, start = 1, end = 3, destination = 8) > > > > should rearrage the array such that the new array looks like {9, 1, 5, > > > 4, 8, 10, 7, 5, 8, 1} > > > > Try to come up with an algorithm that is faster than O(n^2) > > > > Thanks > > > Gopi > > > -- > > You received this message because you are subscribed to the Google Groups > > "Algorithm Geeks" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
