About this challenge
Merge Sorted Arrays is a medium algorithms coding challenge. It tests algorithmic thinking and complexity analysis — the kind of problem-solving that shows up constantly in technical interviews. Write your solution in the editor above, run it against the test cases, and get instant feedback — free, in your browser, no sign-up.
Show a hint & approach (spoiler)
Hint: Use two pointers. Compare a[i] and b[j], push the smaller, advance that pointer. Drain leftovers at the end.
Keep practicing
Browse all coding challenges, or build intuition for the underlying concepts with the algorithm visualizers and the developer cheatsheets.