ZoomInfo processes large collections of prospect and company records that may exceed the practical working memory available to a single operation. Given a list of integers representing sortable record keys, sort the data efficiently by dividing it into bounded chunks and performing a k-way merge.
Implement sort_large_dataset(nums, chunk_size) and return a new list containing all values in nondecreasing order. Each chunk must be sorted independently, then merged using a min-heap rather than repeatedly scanning every chunk.
nums, a list of integers, and chunk_size, a positive integer.nums, sorted in nondecreasing order.def sort_large_dataset(nums, chunk_size):