Partition Five Elements By Median in Six Comparisons

Code



Application output:

[10, 20, 50, 40, 30] -> [10, 20, 30, 50, 40] [10, 50, 20, 30, 40] -> [10, 20, 30, 50, 40] [10, 20, 50, 30, 40] -> [10, 20, 30, 50, 40] [50, 10, 20, 40, 30] -> [10, 20, 30, 50, 40] [20, 50, 40, 10, 30] -> [10, 20, 30, 50, 40] [30, 40, 10, 20, 50] -> [20, 10, 30, 50, 40] [30, 10, 50, 40, 20] -> [10, 20, 30, 40, 50] [40, 20, 50, 10, 30] -> [10, 20, 30, 40, 50]

Paste info


Author: Xinok
Views: 1950
Private: no
Expires: Never
Uploaded: 22.09.12 3:41
Votes: 0

Compilation


Compiler: DMD 2.076.1 ( 2.076.1 )
Pointer size: m64

Actions