IncredibleThings

导航

2021年2月9日 #

LeetCode - Find Largest Value in Each Tree Row

摘要: Given the root of a binary tree, return an array of the largest value in each row of the tree (0-indexed). Example 1: Input: root = [1,3,2,5,3,null,9] 阅读全文

posted @ 2021-02-09 14:01 IncredibleThings 阅读(56) 评论(0) 推荐(0)

LeetCode - Find Bottom Left Tree Value

摘要: Given the root of a binary tree, return the leftmost value in the last row of the tree. Example 1: Input: root = [2,1,3] Output: 1 Example 2: Input: r 阅读全文

posted @ 2021-02-09 13:37 IncredibleThings 阅读(70) 评论(0) 推荐(0)

LeetCode - Lowest Common Ancestor of Deepest Leaves

摘要: Given the root of a binary tree, return the lowest common ancestor of its deepest leaves. Recall that: The node of a binary tree is a leaf if and only 阅读全文

posted @ 2021-02-09 09:53 IncredibleThings 阅读(47) 评论(0) 推荐(0)