在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ Given a binary tree, return the sum of values of its deepest leaves. Example 1:
Input: root = [1,2,3,4,5,null,6,7,null,null,null,null,8] Constraints: The number of nodes in the tree is between 1 and 10^4. 给你一棵二叉树,请你返回层数最深的叶子节点的和。
示例:
输入:root = [1,2,3,4,5,null,6,7,null,null,null,null,8] 提示: 树中节点数目在 1 到 10^4 之间。 |
请发表评论