Lexicographically Smallest Permutation With Each Adjacent Swap Used Once

Company: IBM_ASE_MNNIT_23sep

Difficulty: hard