Invert Binary Tree
Try to solve the Invert Binary Tree problem.
We'll cover the following
1 of 3
2 of 3
3 of 3
Understand the problem#
Let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Invert Binary Tree
1
What is the correct mirrored tree for the given tree?
5 / \6 7 / \ 8 9
A)
5 / \6 7 / \ 8 9
B)
5 / \ 7 6 / \ 9 8
C)
5 / \6 7 / \ 9 8
D)
5 / \7 6 / \ 9 8
Question 1 of 20 attempted
Figure it out!#
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Try it yourself#
Implement your solution in main.py in the following coding playground.
Python
usercode > main.py
Invert Binary Tree
Solution: Balanced Binary Tree
Solution: Invert Binary Tree