Given N large sorted log files that do not fit in memory, how would you merge them into a single sorted file?