Ezvor

1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree

MediumTree Preparing judge… LeetCode
TreeDepth-First SearchBreadth-First SearchBinary Tree

Hints

Hint 1
Depth-first search (DFS) with the parameters: current node in the binary tree and current position in the array of integers.
Hint 2
When reaching at final position check if it is a leaf node.