Re: [閒聊] 每日leetcode已回收

看板Marginalman作者 (franchouchouISBEST)時間1年前 (2024/05/17 22:10), 編輯推噓3(304)
留言7則, 7人參與, 1年前最新討論串237/1554 (看更多)
1325. Delete Leaves With a Given Value 還行 再找一題來寫好ㄌ def removeLeafNodes(self, root: Optional[TreeNode], target: int) -> Optional[TreeNode]: if root is None: return None root.left = self.removeLeafNodes(root.left, target) root.right = self.removeLeafNodes(root.right, target) if root.left is None and root.right is None and root.val==target: return None else: return root -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.228.146.144 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Marginalman/M.1715955036.A.C8C.html

05/17 22:10, 1年前 , 1F
別捲了 不然用Rust捲
05/17 22:10, 1F

05/17 22:11, 1年前 , 2F
大師
05/17 22:11, 2F

05/17 22:11, 1年前 , 3F
你要用c寫
05/17 22:11, 3F

05/17 22:12, 1年前 , 4F
大師
05/17 22:12, 4F

05/17 22:13, 1年前 , 5F
大師
05/17 22:13, 5F

05/17 22:14, 1年前 , 6F
大師
05/17 22:14, 6F

05/17 22:17, 1年前 , 7F
肥肥我不會rust:( C是觸手在用的
05/17 22:17, 7F
文章代碼(AID): #1cHsLSoC (Marginalman)
討論串 (同標題文章)
文章代碼(AID): #1cHsLSoC (Marginalman)