Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 156. Binary Tree Upside Down
Transform a binary tree by flipping it upside down so the original leftmost node becomes the new root and each parent becomes the right child while the original right child becomes the left child. The challenge is to rewire node pointers along the left spine (in-place, O(n) time) to produce the new tree structure.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late October, 2025
Senior
Given the root of a binary tree, turn the tree upside down and return the new root. Both recursive + iterative approaches were expected.
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.