討論串[閒聊] 每日LeetCode
共 719 篇文章
內容預覽:
103. Binary Tree Zigzag Level Order Traversal. 給一棵二元樹,. 求他的 zigzag level order traversal,. 也就是第一層從左到右,第二層從右到左,第三層從左到右,以此類推。. Example 1:. Input: root =
(還有1305個字)
內容預覽:
103. Binary Tree Zigzag Level Order Traversal. 給你一個樹,找出Z字型走訪的列表。. Example:. https://assets.leetcode.com/uploads/2021/02/19/tree1.jpg. Input: root = [3
(還有1882個字)
內容預覽:
226. Invert Binary Tree. 給一棵二元樹,. 要把樹上的每個節點的左右子節點都交換。. Example 1:. Input: root = [4, 2, 7, 1, 3, 6, 9]. Output: [4, 7, 2, 9, 6, 3, 1]. Explanation:. h
(還有833個字)
內容預覽:
783. Minimum Distance Between BST Node. 給一棵二元搜尋樹,. 求任意兩節點差值的最小值。. Example 1:. Input: root = [4, 2, 6, 1, 3]. Output: 1. Explanation:. https://assets.l
(還有1069個字)
內容預覽:
104. Maximum Depth of Binary Tree. 給你一個二元樹,求出他的最大深度。. Example:. https://assets.leetcode.com/uploads/2020/11/26/tmp-tree.jpg. Input: root = [3,9,20,nul
(還有369個字)