Verkada interview question

k way merge sort, get intersection