We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 678d42f commit 167f5a7Copy full SHA for 167f5a7
紀錄/40 2022 0308 Heap 3nd.md
@@ -27,3 +27,12 @@
27
* 🔓 MEDIUM 1167 Minimum Cost to Connect Sticks https://leetcode.com/problems/minimum-cost-to-connect-sticks
28
* MEDIUM 1642 Furthest Building You Can Reach https://leetcode.com/problems/furthest-building-you-can-reach
29
* HARD 295 Find Median from Data Stream https://leetcode.com/problems/find-median-from-data-stream
30
+
31
+---
32
33
+- 從 Array 建立起 Heap 的時間複雜度
34
+ - Foreach => O(N LogN)
35
+ - Heapify => O(N)
36
+- No. 347. Top K Frequent Elements 解法
37
+ - 算出每個數字的頻率後,把頻率表放進 heap
38
+ - 使用 Bucket Sort
0 commit comments