SLB interview question

Sorting and merging questions. Leetcode medium