搜索结果
查询Tags标签: 1315,共有 4条记录-
[LeetCode] 1315. Sum of Nodes with Even-Valued Grandparent 祖父节点值为偶数的节点和
Given the root of a binary tree, return the sum of values of nodes with an even-valued grandparent. If there are no nodes with an even-valued grandparent, return 0. A grandparent of a node is the parent of its parent if it exists. Example 1:Input: roo…
2022/8/31 14:22:57 人评论 次浏览 -
LeetCode - Medium - 1315. Sum of Nodes with Even-Valued Grandparent
Topic TreeDepth-first Search Description https://leetcode.com/problems/sum-of-nodes-with-even-valued-grandparent/ Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is the parent of its parent…
2021/6/21 14:28:39 人评论 次浏览 -
[LeetCode] 1315. Sum of Nodes with Even-Valued Grandparent
Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is the parent of its parent, if it exists.) If there are no nodes with an even-valued grandparent, return 0. Example 1:Input: root = [6,7,8,…
2021/6/3 14:23:58 人评论 次浏览 -
1315. Sum of Nodes with Even-Valued Grandparent
Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is the parent of its parent, if it exists.) If there are no nodes with an even-valued grandparent, return 0.Example 1:Input: root = [6,7,8,2…
2021/4/17 20:30:10 人评论 次浏览