Next Greater Permutation Leetcode Solution 1984