31. Next Permutation

class Solution {
    public void nextPermutation(int[] nums) {
        if(nums.length<=1)return;
        boolean flag = false;
        int i = nums.length-2;
        for(;i>=0;i--){
            if(nums[i]

你可能感兴趣的:(31. Next Permutation)