討論串[閒聊] 每日leetcode
共 1548 篇文章

推噓2(2推 0噓 1→)留言3則,0人參與, 1年前最新作者argorok (死肥肥社管)時間1年前 (2024/05/03 09:32), 編輯資訊
0
0
1
內容預覽:
來個py無腦寫法 完全不想思考 感覺要一輩子當自宅守備員了. class Solution:. def compareVersion(self, version1: str, version2: str) -> int:. ver1 = version1.split('.'). ver2 = ver
(還有161個字)

推噓4(4推 0噓 1→)留言5則,0人參與, 1年前最新作者Rushia (早瀬ユウカの体操服 )時間1年前 (2024/05/03 09:20), 1年前編輯資訊
0
0
1
內容預覽:
https://leetcode.com/problems/compare-version-numbers/description. 165. Compare Version Numbers. 給你兩個表示版本的字串,求出哪個版本比較大. If version1 < version2, return
(還有892個字)

推噓6(6推 0噓 3→)留言9則,0人參與, 1年前最新作者oinishere (是oin捏)時間1年前 (2024/05/02 13:52), 編輯資訊
0
0
1
內容預覽:
婷婷:可不可以用unordered map. 其實用set也可以捏. 反正只是記錄而已. 捏. ```cpp. class Solution {. public:. int findMaxK(vector<int>& nums). {. int res = -1;. int len = nums.s
(還有126個字)

推噓3(3推 0噓 2→)留言5則,0人參與, 1年前最新作者sustainer123 (caster )時間1年前 (2024/05/02 10:27), 編輯資訊
0
0
1
內容預覽:
https://reurl.cc/lQeDQj. 2441. Largest Positive Integer That Exists With Its Negative. 給定一不包含0的數列,尋找最大正整數,此正整數k的-k需存在於nums. 回傳正整數k 如果無符合條件的正整數 回傳-1. E
(還有887個字)

推噓3(3推 0噓 2→)留言5則,0人參與, 1年前最新作者sustainer123 (caster )時間1年前 (2024/05/01 10:03), 編輯資訊
0
0
1
內容預覽:
https://leetcode.com/problems/reverse-prefix-of-word. 2000. Reverse Prefix of Word. 給定一string與一character 找到該character 假定該character的index為i. 翻轉word[0]到
(還有1294個字)