> > Hi,
> >  I have this puzzle.
> >  Given N numbers, N>4, you have to sort the
> numbers.
> >  The only operation permitted is you can rotate
> any
> > sequencial 4 numbers in reverse order. or you can
> > roate the entire list sequencially.
> > 
> > How do u approach this??
> > 
> What is a reverse/sequential rotation ?


 1. you can compare numbers.
 2. rotate sequencial  4 numbers:
    from.. 1 2 3 4 5 6 7
    to     1 2 6 5 4 3 7
    (ie.. 3 4 5 6 is rotated to 6 5 4 3)
 3. rotate entire sequence
     from.. 1 2 6 5 4 3 7
     to     3 7 1 2 6 5 4

Artist
 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Reply via email to