Merging Two Sorted Lists
Given two lists of integers a
and b
sorted in ascending order, merge them into one large sorted list.
Constraints
0 ≤ n ≤ 200,000
wheren
is the length ofa
0 ≤ m ≤ 200,000
wherem
is the length ofb
https://binarysearch.com/problems/Merging-Two-Sorted-Lists
Examples
Example 1
Input
- a =
[5, 10, 15]
- b =
[3, 8, 9]
Output
- answer =
[3, 5, 8, 9, 10, 15]
Leave a comment