Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Miguel Rodriguez
Solution time complexity is wrong, pushing first element of each list to heap costs O(M Log M)

Miguel Rodriguez

Sep 21, 2025

Better to add to a list then call heapify, cost will be O(M) for this operation vs O(M Log M) in the solution.

1

0

Comments
Comments

On this page