Next Greater Permutation Leetcode Solution 862