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

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

Medium

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

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

Asked in

accenture

Examples

Example 1:
Input: [1,3,5], [2,4,6]
Output: [1,2,3,4,5,6]
Example 2:
Input: [1,2,3], [4,5,6]
Output: [1,2,3,4,5,6]
Submit Result

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