Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Depth-first search (DFS) with the parameters: current node in the binary tree and current position in the array of integers.
When reaching at final position check if it is a leaf node.