Question bank › Two Pointers
Dsa Two Pointers Warm-up

Merge Two Sorted Arrays

Given two sorted arrays of integers, write a function to merge them into a single sorted array. Input: The first line contains space-separated integers of the first array. The second line contains space-separated integers of the second array. Output: A single line of space-separated integers representing the merged sorted array. Example: Input: 1 3 5 2 4 6 Output: 1 2 3 4 5 6

Key concepts

two_pointersarraymerging

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.