Skip to content

Create 42 2022 0503 heap 5th.md #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2022
Merged

Create 42 2022 0503 heap 5th.md #35

merged 2 commits into from
May 16, 2022

Conversation

ytyubox
Copy link
Member

@ytyubox ytyubox commented Apr 28, 2022

LeetCode 讀書會第 42 次聚會 2022/05/03

leetcode 讀書會通知

  1. 項目: 第 42 次聚會
  2. 目的: 線上一起寫題目, 由有想法的人帶領, 先解題, 再看該題有趣的解法
  3. 時間: 05/03 (二) 20:00 ~ 21:00
  4. 地點: google meet 線上 (前 10 分鐘預備鏈接)
  5. 解題項目: Heap
  6. 共筆: GitHub https://github.com/programmingbookclub/Leetcode-club
  7. 備註: 這次會看 378, 是一題 MEDIUM 的題目

@ytyubox
Copy link
Member Author

ytyubox commented May 3, 2022

list + 1631

@ytyubox
Copy link
Member Author

ytyubox commented May 3, 2022

Y.J. LEE下午8:02
Helli
Hello XD
Y.J. LEE下午8:30
Tip: time/space analysis 可以把avg case / best case / worst case分開討論
Y.J. LEE下午8:54
10個剛好可以
8就有可能出現在mat[1][-1] 最後一個
Y.J. LEE下午8:55
great test case
Louis Su下午8:56
🙏
Y.J. LEE下午9:05
很優啊 實戰給出binary search應該就是optimal solution了
Y.J. LEE下午9:09
👍
Y.J. LEE下午9:11
yes, #1631 can use heap
Lester下午9:13
有事先走唷,謝謝大家。
Y.J. LEE下午9:13
881
Y.J. LEE下午9:15
剛那題時間複雜度比較複雜
每一行還可以再binary search一次
我當時是寫 time O(nlogn * log(S)), where S=span of min to max
但是也不確定對不對
Y.J. LEE下午9:18
嗯 前面 nlogn就是 猜了那個數以後 數一數看看比他小的有幾個
Louis Su下午9:18
https://github.com/louis222220/leetcode-practice/pull/2/files
Y.J. LEE下午9:24
nice implementation
看了一下 Java 的實作
他是用 generic iterator
Y.J. LEE下午9:26
https://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/util/PriorityQueue.java

@ytyubox ytyubox merged commit 939ce3f into main May 16, 2022
@ytyubox ytyubox deleted the 42-2022-0503-heap-5th branch May 16, 2022 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant