How to solve (almost) any binary tree coding problem

preview_player
Показать описание
NB: This video is ad-free, you can choose to support Inside code by purchasing one of the courses above or dropping a super thanks!
NB2: Discounts of courses above are permanent

Рекомендации по теме
Комментарии
Автор

This is the most undervalued tree algorithm video.
Info here is gold. Thanks man!

edy
Автор

I love people who make things this simple, just subscribed to your channel.

kwamenani
Автор

Wow. Brilliant nugget!! Literally opened my eyes to the problems I am solving!!

cakec
Автор

Dude what an explanation. Thank you so much, using recursion to solve binary tree problems has been a really huge problem till now

tahaather
Автор

This is actually an amazing piece of intuition

iez
Автор

Give this guy a whole lot of
I feel confident to solve tree problems.You Rock man
Please Create a video how to solve graph problems.

indraneel
Автор

Thank u so so soo much man
Non linear data structures were really tough for me
From school to college
It was tough for me to understand
But now when i am preparing for a job
I saw your video
And u saved my life
Thank u so much

TourismFunFriends
Автор

🔴
/ \
🔵—🔴
| |
🔴—🔵

insidecode
Автор

Well, this is true for a certain kind of trees, where each node counts as equivalent. The same algorithm doesn't necessarily apply to segment trees, binary search trees, KD-trees etc. where an element's position in the tree is more important than its sole presence in the tree.

marcin-guitar
Автор

This was the coolest explanation of complex problem ever..Thank you

mdzikrullah
Автор

Very easy described man!
Give this man a medal!

KGTube
Автор

I just wanna say, that thinking of recursion in a way where we fragment the root node made much sense.
My exam is next week, thanks!

karthigeyanramesh
Автор

Finally, this is what I have been looking for; algorithms with proper visualizations. I had to buy all your 5 courses on udemy

longchikanouo
Автор

With all respect to the author, this is trivial problems, I thought you clarify at least one of non-trivial: controlling levels of tree, controlling branches of tree, controlling nodes of tree or controlling symmethric of tree.

sergeynazarov
Автор

For height of tree it must return -1 if root is null.(2.42)

gurudevsanthosh
Автор

Hey Inside Code I loved the video! I just wanted to correct the treeHeight algorithm. It needs to return -1 if the root is None because currently with the returning of 0, the leaf nodes get a height of 1 instead of a height of 0 which will cause the resulting tree height to be 1 greater than it should be.

levidworkin
Автор

MAN YOU MADE ME UNDERSTAND RECURSION, finally! Thank you so much!

danielapineyro
Автор

You just earned a new subscriber....


Spent hours searching for a simple explanation on Trees, found it in your channel.

igbalajobizhikrullah
Автор

amazing video !! please make more videos in binary trees and graphs

vijayola
Автор

Fix: At 2:38, the base case should return -1 not 0

insidecode