Next Greater Permutation Leetcode Solution 1969