Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Next Permutation
Bookmark
Brute Force
Optimal
Input
Input 1
Descending
Duplicates
Custom
nums
=
[1, 2, 3]
nums
1
2
3
1
2
3
0
1
2
checked
0
total
6
1
list permutations
2
find nums
3
take the next
nums
1
2
3
1
2
3
0
1
2
checked
0
total
6
1
list permutations
2
find nums
3
take the next
nums
1
2
3
1
2
3
0
1
2
checked
0
total
6
1
list permutations
2
find nums
3
take the next
nums
1
2
3
1
2
3
0
1
2
checked
1
total
6
1
list permutations
2
find nums
3
take the next
nums
1
2
3
1
3
2
0
1
2
checked
1
total
6
1
list permutations
2
find nums
3
take the next
nums
1
2
3
1
3
2
0
1
2
checked
1
total
6
1
list permutations
2
find nums
3
take the next
algo
master
.
io
Step:
Start: every permutation of nums, in order, holds the answer
0 / 4
Input
Input 1
Descending
Duplicates
Custom
nums
=
[1, 2, 3]
0 / 4
algo
master
.
io
Step:
Start: every permutation of nums, in order, holds the answer