討論串[閒聊] 每日leetcode
共 1549 篇文章
內容預覽:
2965. Find Missing and Repeated Values. https://leetcode.com/problems/find-missing-and-repeated-values/. 一個n*n矩陣 填入n*n數字. 但多一個a(出現兩次)少一個b(出現零次). 求[a,
(還有1276個字)
內容預覽:
https://leetcode.com/problems/count-total-number-of-colored-cells/. 2579. Count Total Number of Colored Cells. 格子每次會從自己四角沒格子的地方長出新格子. 求第n次總共多少格子. Solu
(還有343個字)
內容預覽:
https://leetcode.com/problems/partition-array-according-to-given-pivot. 2161. Partition Array According to Given Pivot. 給你一個陣列nums和一個數字pivot,小於pivot的數
(還有799個字)
內容預覽:
1092. Shortest Common Supersequence. 思路:. 1.先找出str1、str2的最長共同子序列 lcs. 2.把lcs從str1、str2去除掉. 3.將lcs與str1、str2剩下的字元按照順序排放就是答案了. 假設str1、str2長度分別為n、m. 用一個2
(還有1454個字)
內容預覽:
https://leetcode.com/problems/shortest-common-supersequence. 1092. Shortest Common Supersequence. 給你兩個字串,求出他們的最短共同超序列,超序列定義成刪除其中的一些字元後可以. 得到字串s。. 思路:.
(還有1635個字)