darwinrlo / public

0 stars 0 forks source link

Merging k sorted lists #30

Open darwinrlo opened 4 years ago

darwinrlo commented 4 years ago

A heap will actually take a tuple of more than two elements. The first element will be used as the key. For this problem, 3-tuples are inserted into a heap. The first element of a tuple is the number. The second element is the list number. The third element is the number's index in the list.