**Solution with discussion**https://discuss.leetcode.com/topic/79946/python-solution-with-detailed-explanation

**Binary Tree Upside Down** https://leetcode.com/problems/binary-tree-upside-down/?tab=Description

- Implement the steps indicated in the image
- https://goo.gl/photos/2PUi8RTZf83uTqSG7

```
class Solution(object):
def move_right(self, root):
if root == None:
return
self.move_right(root.left)
if root.left:
root.left.right = root.right
root.right = None
return
def reverse(self, root):
prev = None
curr = root
while curr:
temp = curr.left
curr.left = prev
prev = curr
curr = temp
return prev
def swap(self, root):
if root == None:
return
root.right, root.left = root.left, root.right
self.swap(root.right)
return
def upsideDownBinaryTree(self, root):
"""
:type root: TreeNode
:rtype: TreeNode
"""
self.move_right(root)
root = self.reverse(root)
self.swap(root)
return root
```