On 02/04/2016 03:30 PM, Timon Gehr wrote:
At most 6 comparisons, <=3 swaps, idempotent (optimal number of swaps):
Oh, also: could you let that bad boy run and let it find anything that does idempotent partition in 6 compares and 0-7 swaps? Then slowly tighten the number of swaps until you find the best balance between number of swaps and code size. -- Andrei