Rearrange the numbers of nums into the next greater permutation in lexicographic order, in place . If no greater permutation exists (the array is in descending order), rearrange it into the smallest permutation — that is, sorted ascending. Input format The input is a single argument [nums] , a JSON integer array, e.g. [[1,2,3]] . The graded answer is the array after your method mutates it; any value your method returns is ignored.