Approach hintTry it first, then revealHide
Put the head of each list into a min-heap keyed by value; repeatedly pop the smallest node, append it to the result, and push its successor. O(N log k) for N nodes in total.
Put the head of each list into a min-heap keyed by value; repeatedly pop the smallest node, append it to the result, and push its successor. O(N log k) for N nodes in total.