Amazon Interview Question

k-way merge