Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Merge Sorted Array
Bookmark
Input
Example 1
All nums2 smaller
All nums2 larger
Custom
nums1
=
[1, 2, 3, 0, 0, 0]
,
nums2
=
[2, 5, 6]
,
m
=
3
,
n
=
3
nums1
0
1
2
3
4
5
1
2
3
0
0
0
nums2
0
1
2
2
5
6
algo
master
.
io
Step:
Start of algorithm
0 / 18
Input
Example 1
All nums2 smaller
All nums2 larger
Custom
nums1
=
[1, 2, 3, 0, 0, 0]
,
nums2
=
[2, 5, 6]
,
m
=
3
,
n
=
3
0 / 18
nums1
0
1
2
3
4
5
1
2
3
0
0
0
nums2
0
1
2
2
5
6
algo
master
.
io
Step:
Start of algorithm