Permutations III
Build permutations left to right, skipping any value whose parity matches its neighbour; trying values in order yields them sorted.
Build permutations left to right, skipping any value whose parity matches its neighbour; trying values in order yields them sorted.