31. Next Permutation
Problem Statement
Input: nums = [1,2,3]
Output: [1,3,2]Input: nums = [3,2,1]
Output: [1,2,3]Intuition
Links
Video Links
Approach 1:
Approach 2:
Approach 3:
Approach 4:
Similar Problems
Last updated