Amazon Interview Question

I don't remember precisely but it was based on merge sort algorithm