討論串[閒聊] 每日LeetCode
共 719 篇文章
內容預覽:
https://leetcode.com/problems/find-the-difference/description. 389. Find the Difference. 給你一個字串 s 和 t,t 是 s 字串字元亂序並加上一個字元組成的,返回這個被加上. 的字元。. 思路:. 1.對s和
(還有574個字)
內容預覽:
https://leetcode.com/problems/champagne-tower/description. 799. Champagne Tower. 有一個香檳塔,第0層有一個杯子,第1層有兩個杯子(編號為0和1),以此類推,共有100層杯子。. 每個杯子可以裝1個單位的香檳,超出的部分
(還有1661個字)
內容預覽:
https://leetcode.com/problems/longest-string-chain/description. 1048. Longest String Chain. 給你一群字串 words,如果比較短的字串可以透過添加一個字串來得到比較長的字串,這兩個字串我們稱他為一個 Chai
(還有953個字)
內容預覽:
https://leetcode.com/problems/is-subsequence/description. 392. Is Subsequence. 給你一個字串 s 和一個字串 t,求出字串 s 是否是 t 的子序列。. 思路:. 1.左邊指標指向s,右邊指標不斷往右並和s比較,如果左邊指
(還有518個字)
內容預覽:
https://leetcode.com/problems/minimum-operations-to-reduce-x-to-zero/descriptio1658. Minimum Operations to Reduce X to Zero. 給你一個陣列 nums 和一個數字 x ,我們每次
(還有1185個字)