FresherFresher (0–1 yrs)CodingPythonAmazonBloomberg
Same Tree
Check whether two binary trees are structurally identical and have the same node values.
Answers use simple, clear English.
Time: O(n)Space: O(h)
Confidence
#tree#dfs
Check whether two binary trees are structurally identical and have the same node values.
Answers use simple, clear English.