Merge 2 Arrays
Problem Overview
- Merge two sorted integer arrays into one array in non-decreasing order.
- Input: a[n] and b[n], both sorted; Output: all elements combined into a single sorted array.
- Constraints: 1 < n <= 1e5; values range from 0 to 1e9.
- Real-world context: merging sorted lists in data processing and search systems.
- Asked in Oracle interviews; a common coding interview problem and interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
