Subj : Arranging the keys problem To : comp.programming From : mihir Date : Thu Sep 29 2005 02:03 pm 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)). .