yes we can
 a possible solution what i can think is
treat 1&2 (same entity )
and 0 as other so in first pass we will short array which will have (all
zeros first , then 1&2 in some random order )
take index number of zero then in second pass short for 1 & 2

still O(n) but takes 2 pass



On Mon, Aug 23, 2010 at 12:10 PM, Manjunath Manohar <
manjunath.n...@gmail.com> wrote:

> is it possible to do without any extra space...
>
> --
> 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.
>



-- 
Kumar Vishal
____________________________
StAy HunGrY , StAy fOOlisH
____________________________
Contact No:- 09560193839

-- 
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.

Reply via email to