Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Find All Numbers Disappeared in an Array
Bookmark
Input
Standard
Simple
All Same
Custom
nums
=
[4, 3, 2, 7, 8, 2, 3, 1]
4
3
2
7
8
2
3
1
0
1
2
3
4
5
6
7
flip the sign at slot abs(v) - 1; positive slots are missing
algo
master
.
io
Step:
Each value marks its home slot; slots left unmarked are the missing numbers
0 / 36
Input
Standard
Simple
All Same
Custom
nums
=
[4, 3, 2, 7, 8, 2, 3, 1]
0 / 36
4
3
2
7
8
2
3
1
0
1
2
3
4
5
6
7
flip the sign at slot abs(v) - 1; positive slots are missing
algo
master
.
io
Step:
Each value marks its home slot; slots left unmarked are the missing numbers