in reply to Re^3: [OT] Swapping buffers in place.
in thread [OT] Swapping buffers in place.

Now we basically have a smaller array 4 5 6 1 2 3 and we want to swap 4 5 6 and 1 2 3. Hence, recursion.
(actually, in this particular example we still have 3 iterations left in the for loop. The function recurses if the size of the left part of the array is less then or equal to the right part)

Replies are listed 'Best First'.
Re^5: [OT] Swapping buffers in place.
by Anonymous Monk on Mar 02, 2015 at 04:28 UTC
    (damn, I must be tired. disregard that part about recursion :)