All challenges

Algorithm challenge · DSA

Merge Sorted Arrays

Difficulty

easy

Time

~15m

Format

Single

Grading

Auto-graded

#python#javascript#typescript#go#java#cpp#rust#dsa#two-pointers#arrays
Mission file // read carefullyeasy

Given two sorted integer arrays arr1 and arr2, return a new sorted array containing all elements of both arrays.

arr1 = [1, 3, 5], arr2 = [2, 4, 6]  =>  [1, 2, 3, 4, 5, 6]

Build with

mergeSortedArrays(arr1: int[], arr2: int[]) → int[]
PythonJavaScriptTypeScriptGoJavaC++Rust
3 tests
Auto-graded on submit
Start challenge

Sign in to save your progress.