FresherFresher (0–1 yrs)CodingPythonGoogleAmazon
Invert Binary Tree
Invert a binary tree by swapping every left and right child, and return the root.
Answers use simple, clear English.
Time: O(n)Space: O(h)
Confidence
#tree#recursion
Invert a binary tree by swapping every left and right child, and return the root.
Answers use simple, clear English.