Leetcode 1430. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
Given a binary tree and an integer array, determine whether there exists a root-to-leaf path whose node values in order exactly match the array. This requires traversing the tree (typically DFS/backtracking), comparing values at each depth and ensuring the match reaches a leaf with no extra or missing elements.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.