討論串[閒聊] 每日LeetCode
共 719 篇文章

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者yam276 (史萊哲林的優等生)時間2年前 (2023/07/14 17:22), 編輯資訊
0
0
0
內容預覽:
110. Balanced Binary Tree. Given a binary tree, determine if it is height-balanced. Example 1:. Input: root = [3,9,20,null,null,15,7]. Output: true. E
(還有1937個字)

推噓1(1推 0噓 1→)留言2則,0人參與, 2年前最新作者yam276 (史萊哲林的優等生)時間2年前 (2023/07/14 16:47), 編輯資訊
0
0
0
內容預覽:
用Easy來玩Rust. 104. Maximum Depth of Binary Tree. Given the root of a binary tree, return its maximum depth.. A binary tree's maximum depth is the numbe
(還有1069個字)

推噓4(4推 0噓 0→)留言4則,0人參與, 2年前最新作者heterologic (仿生邊緣人)時間2年前 (2023/07/14 01:52), 編輯資訊
0
1
0
內容預覽:
207. Course Schedule. 這題就是標準的拓樸排序. 但就這樣乖乖照著寫有點無聊. 所以我們來利用 C++ 的 shared_ptr. 因為 shared_ptr 只要沒有人指向他就會自己消滅. 所以我們只要維護 adj, 其中. adj[a] = {Pointers[b], Poi
(還有1092個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 2年前最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/07/13 22:51), 2年前編輯資訊
0
1
1
內容預覽:
https://leetcode.com/problems/course-schedule/description/. 207. Course Schedule. 你要修 n 堂課,prerequisites 是一個陣列,prerequisites[i] = [ai, bi]. 表示你要修 ai 之
(還有1995個字)

推噓0(0推 0噓 1→)留言1則,0人參與, 2年前最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/07/12 23:59), 2年前編輯資訊
0
2
1
內容預覽:
https://leetcode.com/problems/find-eventual-safe-states/description/. 802. Find Eventual Safe States. 給你一個編號為 0 到 n-1 的有向圖 graph,定義:. 終端節點:沒有任何向外的邊。.
(還有2185個字)