Next Greater Permutation Leetcode Solution 19