So I'm trying to create an algorithm for the problem of removing the minimum from k sorted doubly linked lists. Here, we have k sorted doubly linked lists where n is the sum of all of the elements in all of the lists. We want to be able to remove the minimum within O(logk) time and only take O(n) time to initialize the data structure.
I was thinking of creating a minimum heap where the elements are the first element of each list (so only k elements in the heap at a time), but I'm not entirely sure where to go from there, specifically with adding the rest of the elements into the heap. Could anyone please help me out with this?