in reply to Re^3: [OT] Swapping buffers in place.
in thread [OT] Swapping buffers in place.
Something like that...x y a b 1 2 3 4 5 6 7 x y 1 2 a b 3 4 5 6 7 -- recurse x y 1 2 3 4 a b 5 6 7 -- recurse x y 1 2 3 4 5 6 a b 7 x y 1 2 3 4 5 6 7 b a -- first swap on this recusion level x y 1 2 3 4 5 6 7 b a -- restore y's position x y 1 2 3 4 5 6 7 a b -- second swap and recurse $y == @$ary now, so stop.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: [OT] Swapping buffers in place.
by Anonymous Monk on Mar 02, 2015 at 00:15 UTC |