
Untitled
By: a guest on
May 25th, 2012 | syntax:
None | size: 0.43 KB | hits: 11 | expires: Never
Basic algorithm proof
Sorted:
[lowest, low, low, x] distance1 = x-lowest
[y, high, high, highest] distance2 = highest-y
Swapped:
[lowest, low, low, y] distance3 = y-lowest
[x, high, high, highest] distance4 = highest-x
[lowest, low, low, y]
[high, high, highest, x]
[lowest, low, low, x]
[lowM, lowM, highM, highM]
[highM, y, high, highest]
[lowest, low, lowM, lowM]
[highM, highM, highM, y]
[x, highM, high, highest];