Invert Binary Tree - Leetcode 226 - Trees (Python)

preview_player
Показать описание


Please check my playlists for free DSA problem solutions:

Best Courses for Analytics:
---------------------------------------------------------------------------------------------------------

Best Courses for Programming:
---------------------------------------------------------------------------------------------------------

Best Courses for Machine Learning:
---------------------------------------------------------------------------------------------------------

Best Courses for Statistics:
---------------------------------------------------------------------------------------------------------

Best Courses for Big Data:
---------------------------------------------------------------------------------------------------------

More Courses:
---------------------------------------------------------------------------------------------------------

Full Disclosure:
Please note that I may earn a commission for purchases made at the above sites! I strongly believe in the material provided; I only recommend what I truly think is great. If you do choose to make purchases through these links; thank you for supporting the channel, it helps me make more free content like this!
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms For FREE at AlgoMap.io!

GregHogg
Автор

Greg!! Your channel is becoming my new go-to! Ty for another intuitive solution. I solved it by myself as I am determined to build a solid understanding of recursion and DFS, still wanted to check your video to see how do you approach and explain it.

noextrasugar
Автор

Wait! I don't understand how the space complexity is O(n), or rather O(h)?
We are not creating any new variables to store, we are just recursing and then returning right?

egg
Автор

A very intuitive thinking and good explanation.

pardhi