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

0% completed

Vote For New Content
Why would we ever push everything onto a heap? Sorting and summing the subarray ...

Ryan Chibana

Dec 5, 2022

Why would we ever push everything onto a heap? Sorting and summing the subarray would be faster.

1

0

Comments
Comments
T N
T N2 years ago

heapify is O(N), faster than sorting O(nlogn)