How to Construct a Binary Search Tree

preview_player
Показать описание
In this algorithm tutorial, I walk through how to construct a binary search tree given an unordered array, and then how to find elements inside of the tree.
Рекомендации по теме
Комментарии
Автор

Hello to students from The Odin Project

jesseliverless
Автор

Very well explained. I really had hard time understanding BST before this video!

egncn
Автор

I always thought binary search trees had to be balanced and that was giving me a hard time. I know now that having an ugly tree is perfectly fine

darkkupo
Автор

#1 explanation about BST in U-tube. 100% 👍👍👍

racecar
Автор

Awsome sir i got full marks in my examination at this question.

dhruvsahu
Автор

What if we want to search 7? is the last 7 after 8 will be searched or when it search the first 7 and the search end?

blublackbluberry
Автор

why did 8 'split' the 9 node? every other number went down the tree to the last entry and then to the left or right of it but 8 went to 9, skipped 14 and went to the left of 9. Why is that?

anch
Автор

Thank you so much for helping me understand the concept !!

vaishnavihegde
Автор

Might be out of the scope of the video but what would happen if you search for 7. Would it return the 7 on the first node or the 7 on the last node or both?

aldoportillo
Автор

Can you draw BST's in a different order but it still follows the rule of a BST? like can there be 2 versions

MinecraftNrd
Автор

About 7 - your argument is that it goes right, because it's NOT LESS then 7, i can got with the same argument and say it can't got left because it's NOT GREATER then 7.
It should just remain the way it was, without adding extra 7 into the tree.

vinci_irl
Автор

what is the order of building BST from an array?or for example, building BST from 3 sorted arrays?

soniasargolzaei
Автор

This video saved me . It's really helpful.

qiongyun
Автор

this is why binary search is only effectively working on already sorted arrays

EL_WAFI_CHERKAOUI
Автор

Is this in order or pre order or post order. I am so confused by the 3. I can print out what happens but not draw those tree up from initial array. Anybody that can help me please do, I have a test on monday ;(

barbarabyrne
Автор

thank you .
so much "Understanding"

RakeshHRakeshH-xb
Автор

why repeat 7??? what if you are asked to delete 7 from this binary tree you have formed

anthonywanjiru
Автор

I need graphics project code on this...

darshanzare
Автор

Hare Krishna hare Krishna Krishna Krishna hare hare
Hare ram hare ram ram ram hare hare

mathsclassesbyomsir