Given the roots of two binary trees root and subRoot, return True if there is a subtree of root with the same structure and node values as subRoot, and False otherwise.
A subtree of a binary tree root is a tree that consists of a node in root and all of that node's descendants. The tree root itself is also considered a subtree of root.
root: subRoot:
3 4
/ \ / \
4 5 1 2
/ \
1 2
Input: root = [3,4,5,1,2], subRoot = [4,1,2] Output: True Explanation: The subtree rooted at node 4 in root is identical to subRoot.
root: subRoot:
3 4
/ \ / \
4 5 1 2
/ \
1 2
\
0
Input: root = [3,4,5,1,2,null,null,null,null,0], subRoot = [4,1,2] Output: False Explanation: Node 4 in root has an extra child 0, so the subtrees are not identical.
root = [3,4,5,1,2], subRoot = [4,1,2]