<aside>
💡
Balanced tree
h = height of tree
n = no of nodes
h= log n
</aside>
Level order
- https://leetcode.com/problems/binary-tree-level-order-traversal/description/
- https://leetcode.com/problems/binary-tree-right-side-view/
- ⭐⭐https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/description/ —> O( 1 ) space
Pre order
https://www.youtube.com/watch?v=-DzowlcaUmE
Level order⭐⭐
⇒ if pointer on null and you’re removing it..
⇒ just put again the null pointer in queue at the time when you are removing it