Merge Two Sorted Arrays
Easy
Arrays
Array
Two Pointers
Sorting
Given two sorted integer arrays, merge them into one sorted array. Print space-separated.
Constraints
0 ≤ length ≤ 10^4
Examples
Example 1:
Input: 1 3 5
2 4 6
Output: 1 2 3 4 5 6
Example 2:
Input: 1
2
Output: 1 2
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console