There are two ways to merge k-sorted lists. One is to pick the min from all k lists (k) and then insert it into the final list. For every n, this will on average have you doing k-1 comparisons * n, with some minor efficiencies as lists evaporate and k becomes smaller.

The second way is the one I've done here. I merge every pair of lists together and push them back onto the array. Once a single lists remains I return this result. This allows for things like merging 3 lists (merge 1 and 2, then merge 3 and result). In my case I've chosen to treat the list like a queue. I pull off two lists, merge them, then drop them back in the queue.