complete problems/next-permutation/ in place