Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Russian Doll Envelopes
Bookmark
Input
Example 1
Example 2
Example 3
Custom
envelopes
=
[[5,4],[6,4],[6,7],[2,3]]
size =
0
w x h
5
×
4
6
×
4
6
×
7
2
×
3
0
1
2
3
tails
·
·
·
·
most envelopes that fit one strictly inside the next?
algo
master
.
io
Step:
Nest envelopes: each must fit strictly inside the next (both width AND height larger)
0 / 33
Input
Example 1
Example 2
Example 3
Custom
envelopes
=
[[5,4],[6,4],[6,7],[2,3]]
0 / 33
size =
0
w x h
5
×
4
6
×
4
6
×
7
2
×
3
0
1
2
3
tails
·
·
·
·
most envelopes that fit one strictly inside the next?
algo
master
.
io
Step:
Nest envelopes: each must fit strictly inside the next (both width AND height larger)