Subj : Re: Arranging the keys problem To : comp.programming From : Willem Date : Thu Sep 29 2005 09:20 pm mihir wrote: ) There are n keys of different 3 colors say white ,red and blue only.Now ) we have to arrange keys such that red keys come before white ones and ) white ones come before blue keys eg RWWBBB where the keys are placed in ) any random order.Give me a linear time algorithm to solve this problem ) ( O(n)). Quicksort. You may need a slight tweak to make it linear time. SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT .