A simple modification to quicksort will do the trick !

On 11/13/07, geekko <[EMAIL PROTECTED]> wrote:
>
>
> you are given an array of integers containing only 0s and 1s. You have
> to place all the 0s in even positions and 1s in odd position. And if
> suppose, no. of 0s exceeds no. of 1s or vice versa keep them
> untouched. Do in ONE PASS without taking extra memory.(modify array in
> place)
>
>
> >
>


-- 
Ciao,
Ajinkya

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to