Binary Search Tree: Traversal & Height - Beau teaches JavaScript

preview_player
Показать описание
This video builds upon the previous binary search tree video. Find the height of a binary search tree. Also, use use depth-first and breadth-first search through in-order, pre-order, post-order, and level-order traversal.

⭐JavaScript Playlists⭐

-
We're busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.

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

Beau should explain what kind of intuition inspired this implementation of findMinHeight() and findMaxHeight() functions. The levelOrder() was just an ingenious implementation. Nice.

shadmanmartinpiyal
Автор

Man, that was an amazing video! Thanks a lot, you explained pretty well and detailed! Congrats bro :)

ClovisNeto
Автор

i'm still confused about the findMinHeight() and findMaxHeight() functions if you could explain each line of code for those functions, that would be great.

willowsongbird
Автор

Good elaboration. It took me watching it 3 times to completely understand it. ^_^

goodwish
Автор

Thank you for the video, but I am confused in the min and max functions as you are adding 1 to an object? node.right/node.left would be a an object with value, left, and right properties, so how is it that you can add a number to an object? And how can objects be greater than or less than other objects in the if statements? Sorry, I'm very confused here, I know I'm not understanding something in the code.

anthonyz
Автор

Hmm Your level order traversal was really complicated for me to implement in python. as I am following along in python. I stumble upon an easier pseudo code that uses queue
- Enqueue node
- while queue has element
- deque node
- process node
- enqueue node children

Great set of tutorials thought.

evanxg
Автор

Hey I am confused about finding the minimum and maximum height can anyone help me

jinjashorts
Автор

just ready code; no explanation on how it achieves the result.

berkelmas