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

推噓3(3推 0噓 2→)留言5則,0人參與, 2年前最新作者GTR12534 (賴.普拿疼.潘志遠)時間2年前 (2023/09/19 00:28), 編輯資訊
0
0
1
內容預覽:
如果用 Python 來寫的話,其實可以運用語言特性來進一步減少要做的事情。. 由於 Python 的排序是 stable 的,亦即相同的元素會保有原有的順序;. 而如果我們直接對陣列做排序,因為 Python 中陣列的比較是 element-wise 的,. 所以如果:. 1. 陣列 i 比陣列
(還有718個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 2年前最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/09/18 17:10), 編輯資訊
0
1
1
內容預覽:
https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/description. 1337. The K Weakest Rows in a Matrix. 給你一個陣列mat[][],mat[i][j] = 0 表示市民,1 表示士
(還有829個字)

推噓2(2推 0噓 3→)留言5則,0人參與, 2年前最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/09/16 23:51), 編輯資訊
0
1
1
內容預覽:
https://leetcode.com/problems/path-with-minimum-effort/description. 1631. Path With Minimum Effort. 給你一個陣列 heights[][],heights[i][j] 表示座標位置(i,j)的高度,兩個
(還有1547個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/09/16 02:44), 2年前編輯資訊
0
1
1
內容預覽:
https://leetcode.com/problems/min-cost-to-connect-all-points/description/. 1584. Min Cost to Connect All Points. 給你一個陣列表示 n 個點 points[i] = [xi, yi],連結
(還有2416個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者Rushia (みけねこ的鼻屎)時間2年前 (2023/09/12 11:07), 編輯資訊
0
1
1
內容預覽:
https://leetcode.com/problems/minimum-deletions-to-make-character-frequencies-unique/description/1647. Minimum Deletions to Make Character Frequencies
(還有1205個字)