Next Permutation
Medium
Array Techniques
Print the next lexicographically greater permutation of the array. If the array is the largest permutation, print the smallest (sorted ascending).
Constraints
1 <= n <= 100 0 <= nums[i] <= 100
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.