Complete the code to initialize the min heap size.
int heapSize = [1];The heap size should be initialized to k, the number of sorted lists to merge.
Complete the code to extract the minimum element from the heap.
Node* minNode = [1](minHeap);The function extractMin removes and returns the smallest element from the min heap.
Fix the error in the code to insert the next element from the extracted node's list into the heap.
if (minNode->next != NULL) { [1](minHeap, minNode->next); }
After extracting the minimum node, we insert its next node into the heap using insertHeap.
Fill both blanks to correctly build the min heap and initialize the array of heap nodes.
Node* heapNodes = malloc(sizeof(Node*) * [1]); buildHeap(heapNodes, [2]);
The array heapNodes should have size k, and buildHeap is called with heapSize to organize the heap.
Fill all three blanks to correctly update the merged list and heap after extracting the minimum node.
mergedTail->next = [1]; mergedTail = mergedTail->next; if ([2] != NULL) { [3](minHeap, [2]); }
We link the extracted minNode to the merged list, move the tail, and if the next node exists, insert it into the heap using insertHeap.
