Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
           map { $_ % 2 ? ( $high --, $low ++) : ( $low ++, $high --) }
           1 .. $length / 2;
    }
    
  2. or download this
    hog ace big gog fig cat dog egg
    
  3. or download this
    sub reOrder
    {
    ...
           1 .. $length / 2;
        return @slice, $low == $high ? $low : ();
    }