This increasing and decreasing sequence is known as Bitonic sequence and bitonic sort is used to sort this sequence( As I can recall from parallel computing course ;) )
On Wed, Mar 2, 2011 at 8:33 PM, Shreyas VA <[email protected]> wrote: > I think in this case bubble sort with early exit will be efficient > > > On Wed, Mar 2, 2011 at 8:16 PM, snehal jain <[email protected]> wrote: > >> The LL is in alternating ascending and descendin orders. Sort the list >> efficiently >> egs: 1->2->3->12->11->2->10->6->NULL >> >> -- >> 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. > -- Thanks & Regards, Gaurav Gupta 7676-999-350 "Quality is never an accident. It is always result of intelligent effort" - John Ruskin -- 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.
