Check if the linked list appears exactly in the binary tree by following a downward path (only moving from parent to child).
The starting point in the tree can be any node.
If there exists a path downward where node values match the list in order, return true, otherwise return false.
Input: head = [7, 3] root = [7, 3, 5]
Output: true
Explanation:
Starting at the root, 7 → 3 matches the linked list.
Input: head = [2, 4, 6] root = [2, 4, null, 6]
Output: true
Explanation:
Downward path matches exactly.
Input: head = [1, 9] root = [1, 2, 3, 4]
Output: false
Explanation:
No downward path equals the linked list.
Accepted:
Submission: