Skip to content

MergeKSortedLists (Greedy/Heap)

Topic: 10. Heaps

1. Greedy Choice

  • Strategy: Local optimal choice?
  • Data Structure: PriorityQueue?

2. Complexity

  • Time: O(N log N)
  • Space: O(N)

3. Code

package com.dsa.heaps;

import java.util.*;

public class MergeKSortedLists {
    public void solve() {
        // TODO: Implementation
    }
}