// output of ./demo/ds/dichotomy-demo.cc:
// Description:
//% Partitioning of n elements into two classes, 'left' and 'right'.
//% Elements can be moved (by value or index) between 'left' and 'right' in O(1).

arg 1: 10 == n  [Length of things]  default=10
 : 0 1 2 3 4 5 6 7 8 9  0:10
 2 : 1 0 3 4 5 6 7 8 9  1:9
 2 3 : 0 1 4 5 6 7 8 9  2:8
 2 3 4 : 1 0 5 6 7 8 9  3:7
 2 3 4 5 : 0 1 6 7 8 9  4:6
 2 3 4 5 6 : 1 0 7 8 9  5:5
 2 3 4 5 6 7 : 0 1 8 9  6:4
 2 3 4 5 6 7 8 : 1 0 9  7:3
 8 3 4 5 6 7 : 2 1 0 9  6:4
 8 7 4 5 6 : 3 2 1 0 9  5:5
 8 7 6 5 : 4 3 2 1 0 9  4:6
 8 7 6 : 5 4 3 2 1 0 9  3:7
 8 7 : 6 5 4 3 2 1 0 9  2:8
 8 : 7 6 5 4 3 2 1 0 9  1:9
 : 8 7 6 5 4 3 2 1 0 9  0:10
