Leetcode Next Permutation Coding