Amazon SDE 1 Onsite
Anonymous User
1260

I was asked this question in Amazon onsite. I was not able to figure out how to do this.

**Question:
**Given 2MB of heap memory available, a 500 MB file, contains 32-bit unsorted integers. Write a function which takes a file name as input and return sorted file.
The interviewer asked me to assume that we already have a merge function in place and it can merge 2 chunks of 2MB each.

Could anyone help me understand what was the expectation here.

Comments (3)