Loading problem…
You're building a form validation or data comparison feature that needs to verify whether two nested tree-like structures are identical.
Given the roots of two binary trees p and q, return true if they are the same.
Two binary trees are considered the same if:
isSameTree([1,2,3], [1,2,3]); // true
isSameTree([1,2], [1,null,2]); // false
isSameTree([1,2,1], [1,1,2]); // false