Back to course home
0% completed
Vote For New Content
Quickselect works and give us O(n) in average
lejafilip
Oct 18, 2024
0
12
0
Oct 18, 2024
Instead of pushing all elems to heap, we can enforce the minHeap has a size of K...
Michael Shum
Mar 1, 2023
0
26
0
Mar 1, 2023
Why would we ever push everything onto a heap? Sorting and summing the subarray ...
Ryan Chibana
Dec 5, 2022
1
30
1
Jan 24, 2024
Why isn't heapify used? It's faster at o(n) instead of o(nlogn) with n heappushe...
Chingyuan Wang
Nov 2, 2022
3
25
0
Oct 26, 2024
Correct complexity analysis:Time: nlogn
Shan
Aug 9, 2022
0
12
0
Aug 9, 2022
The max heap solution gives 23 for following inputs:input = [3, 5, 8, 7], k1=2...
Gary
Apr 15, 2022
0
15
1
Apr 16, 2022