This question evaluates a candidate's competency in array manipulation and merging algorithms, emphasizing understanding of ordered data and time complexity. Commonly asked in Coding & Algorithms interviews for Data Scientist roles, it assesses practical application-level skills in implementing efficient (linear-time) merges and algorithmic efficiency awareness.
Given two sorted lists (arrays) of integers A and B in non-decreasing order, merge them into a single sorted list.
A = [1, 3, 5]
,
B = [1, 2, 6]
→
[1, 1, 2, 3, 5, 6]