@sunny That's excellent. Thanks Sunny.
On Jul 9, 7:04 pm, sunny agrawal <[email protected]> wrote: > Reverse elements of set from start to end > Reverse elements of set from end+1 to destination > Reverse elements of set from start to destination > > DONE > O(n) > > > > > > On Sat, Jul 9, 2011 at 7:25 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. > > > -- > > 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. > > -- > Sunny Aggrawal > B-Tech IV year,CSI > Indian Institute Of Technology,Roorkee- 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.
