1325. Delete Leaves With a Given Value
1325. Delete Leaves With a Given Value
Description
Given a binary tree root
and an integer target
, delete all the leaf nodes with value target
.
1325. Delete Leaves With a Given Value
Given a binary tree root
and an integer target
, delete all the leaf nodes with value target
.
549. Binary Tree Longest Consecutive Sequence II
Given the root
of a binary tree, return the length of the longest consecutive path in the tree.
508. Most Frequent Subtree Sum
Given the root
of a binary tree, return the most frequent subtree sum . If there is a tie, return all the values with the highest frequency in any order.
366. Find Leaves of Binary Tree
Given the root
of a binary tree, collect a tree’s nodes as if you were doing this:
1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
Given a binary tree where each path going from the root to any leaf form a valid sequence , check if a given string is a valid sequence in such binary tree.
1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree
Given two binary trees original
and cloned
and given a reference to a node target
in the original tree.