Next Permutation Leetcode Solution