LeetCode
Same Tree
Click
here
for an explanation.