- #1
evinda
Gold Member
MHB
- 3,836
- 0
Hello! (Wave)
I am asked to write a $Ο (n \lg k)$ - time algorithm that merges $k$ sorted lists into one sorted list, where $n$ is the the total number of elements in all the input lists.
Hint: Use a thin heap for a $k$ -way merging.
Do you have an idea what could be meant with [m] thin heap [/m] ? (Worried)
Also, how could we merge $k$ sorted lists into one using a heap?
I am asked to write a $Ο (n \lg k)$ - time algorithm that merges $k$ sorted lists into one sorted list, where $n$ is the the total number of elements in all the input lists.
Hint: Use a thin heap for a $k$ -way merging.
Do you have an idea what could be meant with [m] thin heap [/m] ? (Worried)
Also, how could we merge $k$ sorted lists into one using a heap?
Last edited: