|Write a program to merge two sorted arrays into on...|General Coding Problems

fn merge_sorted(a: &[i32], b: &[i32]) -> Vec<i32>

Medium

Write a program to merge two sorted arrays into one sorted array.

fn merge_sorted(a: &[i32], b: &[i32]) -> Vec<i32>

Asked in

infosys

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]
Submit Result

Click Run to test sample cases, or Submit to evaluate all cases