[#1782] note(MaxAverageRatio): Add solution README
This commit is contained in:
@@ -33,7 +33,7 @@ Return the *maximum* possible average pass ratio after assigning the `extraStude
|
||||
|
||||
2. **最佳解法**:
|
||||
- 思路:
|
||||
- Priority Queue(Max Heap) 存每個班級淺在
|
||||
- Priority Queue(Max Heap) 存每個班級潛在
|
||||
- 時間複雜度:O(?)
|
||||
- 空間複雜度:O(?)
|
||||
|
||||
@@ -55,17 +55,21 @@ Explanation: You can assign the two extra students to the first class. The avera
|
||||
## 學習筆記
|
||||
|
||||
### 今天學到什麼?
|
||||
-
|
||||
- 第一次使用 Priority Queue
|
||||
- 第一次使用 Unit Test
|
||||
|
||||
### 遇到的困難
|
||||
-
|
||||
- 可能要再了解 Priority Queue 更多實際用途
|
||||
|
||||
### 改善方向
|
||||
-
|
||||
|
||||
### 相關題目
|
||||
- [題目編號] 題目名稱 - 相似概念
|
||||
- [題目編號] 題目名稱 - 進階版本
|
||||
- [#1627](https://leetcode.com/problems/graph-connectivity-with-threshold/description/) Graph Connectivity With Threshold
|
||||
- [#1728](https://leetcode.com/problems/cat-and-mouse-ii/description/) Cat and Mouse II
|
||||
- [#3440](https://leetcode.com/problems/reschedule-meetings-for-maximum-free-time-ii/description/) Reschedule Meetings for Maximum Free Time II
|
||||
|
||||
---
|
||||
**總結**: 這題的核心概念是...,適合練習...技巧。
|
||||
**總結**:
|
||||
1. 貪心策略,每次都選擇當下收益最大解
|
||||
2. 練習使用Priority Queue 快速找到最大收益
|
||||
|
Reference in New Issue
Block a user