討論串[閒聊] 每日LeetCode
共 719 篇文章
內容預覽:
662. Maximum Width of Binary Tree. 給你一個二元樹,找出他的最大寬度,最大寬度定義為每層的最左節點到最右節點. 的距離。. Example:. https://assets.leetcode.com/uploads/2022/03/14/maximum-width-
(還有1266個字)
內容預覽:
1372. Longest ZigZag Path in a Binary Tree. 給你一個二元樹,找出這個二元樹裡的Z字型路徑最大長度。. Example :. https://assets.leetcode.com/uploads/2020/01/22/sample_1_1702.png.
(還有944個字)
內容預覽:
1768. Merge Strings Alternately. 給你兩個字串s1和s2,合併兩個字串並使其交錯。. Example:. Input: word1 = "abc", word2 = "pqr". Output: "apbqcr". Explanation: The merged st
(還有879個字)
內容預覽:
1431. Kids With the Greatest Number of Candies. 給你一個陣列 candies ,candies [i] 表示第 i 個小孩有的糖果數量,再給你一個整數extraCandies 表示額外糖果,返回一個 Boolean 列表,他的值為:. 若額外糖果全給第
(還有1489個字)