Hi, how about this - Do a merge sort, now, while merging two sorted list, give more priority to odd numbers :)
I believe this falls into the right solutions :) Any breaking cases? On 24 June 2010 09:41, Gaurav Singh <gogi.no...@gmail.com> wrote: > I think in this case, bubble sorting will be a better idea. just > replace the condition of comparison with the condition that earlier > number is even and later number is odd. I mean we can do sumthing lyk > this : > > for i=1 to n-1 > for j=1 to n-i-1 > if iseven(ar[j]) AND (NOT iseven(ar[j+1])) > then swap both of them. > > Please correct me if I am wrong somewhere. > > -- > 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<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- "Reduce, Reuse and Recycle" Regards, Vivek.S -- 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.