1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
Description
**Input:** root = [0,1,0,0,1,0,null,null,1,0,0], arr = [0,1,0,1]
**Output:** true
**Explanation:**The path 0 -> 1 -> 0 -> 1 is a valid sequence (green color in the figure).
Other valid sequences are:
0 -> 1 -> 1 -> 0
0 -> 0 -> 0**Input:** root = [0,1,0,0,1,0,null,null,1,0,0], arr = [0,0,1]
**Output:** false
**Explanation:** The path 0 -> 0 -> 1 does not exist, therefore it is not even a sequence.ac
Last updated


