Binary Search Tree Removal

  Рет қаралды 46,910

WilliamFiset

WilliamFiset

Күн бұрын

Пікірлер: 50
@Csartreweghhgf
@Csartreweghhgf 5 жыл бұрын
This is by far one the best resource about Data Structure out there
@milan8284
@milan8284 2 жыл бұрын
I have a data structures and algorithms exam tomorrow. I'm currently using your videos to study. Great resource 💯💯💯
@mia-so4ry
@mia-so4ry 3 жыл бұрын
This is amazing, i procrastinated so much bc i was afraid of not understanding this concept but you just solved my problem and gave me motivation again THANK YOU!
@mattp6460
@mattp6460 3 ай бұрын
your explanations of algorithms without actually giving explicit algorithms are really helpful thanks
@beepIL
@beepIL 3 жыл бұрын
I can't believe there are so many paid materials out there that do not even come close to how clear your videos are...
@ghostfjdgcsusvsgsj
@ghostfjdgcsusvsgsj Жыл бұрын
this is the best BST removal tutorial I've seen so far!
@iaa6662
@iaa6662 5 жыл бұрын
The king of Data Structure
@shubhammantri3550
@shubhammantri3550 5 жыл бұрын
You are the best. The way the explain is far better than my university professor.
@fahdcoding8701
@fahdcoding8701 3 жыл бұрын
Great explanation! Out of all the videos I’ve watched this is the one which clicked perfect with me.
@Lexyvil
@Lexyvil 2 жыл бұрын
Phenomenal explanation and demonstration, with great examples! This was a perfect refresher while preparing for my final exam. Thank you.
@bingxie342
@bingxie342 5 жыл бұрын
Just want to say thank you, this channel is so good!!!!!!
@jainam7
@jainam7 6 ай бұрын
wonderful explanation, kudos to your efforts!
@散华-l9m
@散华-l9m 11 ай бұрын
Clear explanation and easy to understand
@kilahuy
@kilahuy 7 жыл бұрын
Very helpful!
@jakoon_the_manic
@jakoon_the_manic Жыл бұрын
Hey, just in general thanks for the videos man, helping me out with my course work
@navyasingh5416
@navyasingh5416 4 жыл бұрын
Best Explanation Ever!!
@Tough802Peter
@Tough802Peter Жыл бұрын
tfuck, how? how can this guy be so genius!!! Love your content
@zain6842
@zain6842 3 жыл бұрын
Thank you so much! You made the whole concept so easy to understand)
@lebenebou
@lebenebou 2 жыл бұрын
wa7esh we7yet emme
@ledtargaouschi5831
@ledtargaouschi5831 Жыл бұрын
Perfect explanation !
@Study-ph6pf
@Study-ph6pf 2 жыл бұрын
Very well explained! Thank you so much, I really appreciate it ♥!
@michaelphelps7284
@michaelphelps7284 3 жыл бұрын
Great video. Earned a subscriber
@anton1492
@anton1492 2 жыл бұрын
perfect explanation. tnx a lot!
@pradyumnbisht4077
@pradyumnbisht4077 4 жыл бұрын
Sir i have a question, when finding successor in 4th case, can we also do like - making 20 the successor and just simply the 5 will point to 11 as its parent. So basically the whole left part of the tree is shifted down to 11 as its parent node.
@iamcasted
@iamcasted 2 жыл бұрын
You are a legend
@pokerface550
@pokerface550 5 жыл бұрын
10:14 - I think it can be only cases I and II since in cases III and IV a left subrtee or both of the subtrees exist, and in such a case we would go further left-down searching for the smallest element untill we come across cases I or II. Isn't it right?
@ahmedhussein6359
@ahmedhussein6359 2 жыл бұрын
compare the picture at 4:04 with the pic at 10:14 brother....you will understand the latter....you are right in the sense that there will never be a case where a node has 2 children, ie case iV....but there cane definitely be cases where a node has 1 child, but the youtuber has categorized both case ii and case iii as cases with one child....thats the confusion....
@hobobmo
@hobobmo 4 жыл бұрын
Great video!
@shayaksarkar7740
@shayaksarkar7740 4 жыл бұрын
I just wantedi to ask that would'nt it be better if instead of copying the values, we somehow found a way to readjust the pointers. Because, it might be possible that I'll be pointing to that particular node elsewhere in my code. If in the removal phase, the value of that node gets tampered without my knowledge, it would be a mess, would'nt it ??
@rustycherkas8229
@rustycherkas8229 2 жыл бұрын
If you are concerned that data at that "saved pointer elsewhere" may be invalidated, then do not save any pointers. It's a variation on "race conditions". I see an empty table in a "food hall", so I go order a burger. Later, when I have my burger, that table is no longer empty... Ain't life a bitch! It would be a mess, too, if your "saved pointer" happens to be the one deleted by intervening operations.
@shayaksarkar7740
@shayaksarkar7740 2 жыл бұрын
@@rustycherkas8229 So what you are trying to say through this huge para is copying the values is a better decision while making BSTs instead of readjusting the pointers. According to me, while deigning the BST we should not make assumptions on how its going to be used. Just design in a way we feel the system is more robust.
@rustycherkas8229
@rustycherkas8229 2 жыл бұрын
@@shayaksarkar7740 If you retain pointers to nodes in multiple places, then you have multiple locii of control. A (balanced) BST works because the caller of insert() allows insert() to change which node is the root node to maintain balance. Deleting nodes can/will cause the tree to become very "unbalanced" so that even find() and insert() perform badly A "binary search tree" can decay into a simple linked list... "robust"? Then you want to "lock" the tree to prevent changes so that your tree cannot be altered while your "code somewhere else" retains control of its node... Good luck with that! It's a dynamic world. Live with it.
@shayaksarkar7740
@shayaksarkar7740 2 жыл бұрын
@@rustycherkas8229 Again ... You don't seem to make 1 point that suggests re-arranging the nodes themselves is not better than copying values. Maybe the users of the BST want to keep references to the nodes. Maybe that is what suits their design needs. "A (balanced) BST works because the caller of insert() allows insert() to change which node is the root node to maintain balance" - Okay, so what? Doesn't mean it gives permission to the nodes to change their values. If the users are using locking, let them do so. Intelligent of them. Still I don't get your point.
@rustycherkas8229
@rustycherkas8229 2 жыл бұрын
​@@shayaksarkar7740 Try this: Your concern seems to be that the memory storing a node will be changed by 'copying' content from another node over top of it. "Code somewhere else" may be affected (expecting the content to be unchanging.) The operation is 'delete'... the memory containing a deleted node (or the 'source node' of the copy operation) will be released or recycled. Subsequent access by "code somewhere else" will cause undefined behaviour. The expectation of "code somewhere else" is flawed. Delete will cause 1 node to be released/recycled... Bad luck if "code somewhere else" has a long-term interest in ANY node & its content... Who "gives permission" for "code somewhere else" to expect nodes of a BST to remain unchanged (when deletion is available.)... 'Better' is in the eyes of the beholder...
@vigneshsr1118
@vigneshsr1118 4 жыл бұрын
Just wanted to say thank you :)
@reassume4826
@reassume4826 4 жыл бұрын
Thanks Sir.
@kartikbhartiya1799
@kartikbhartiya1799 5 жыл бұрын
This is really very heplful! thanks
@vitoanania6042
@vitoanania6042 Жыл бұрын
awesome video.
@anonimanonim1223
@anonimanonim1223 2 жыл бұрын
THANK FOR THIS VIDEO,!!!!!!!!!!!!!
@MuazAtik
@MuazAtik Жыл бұрын
Thank you 👏🙏🙏
@sachinjain6913
@sachinjain6913 9 ай бұрын
BESTT
@mudabirp758
@mudabirp758 Жыл бұрын
Thanks!
@readymade_workshop
@readymade_workshop 3 жыл бұрын
Thank you so much!
@_inetuser
@_inetuser 2 жыл бұрын
best one
@hillstudios1
@hillstudios1 3 жыл бұрын
How can I repay you William.Thank you.I hope you are fine
Binary Search Tree Traversals
11:58
WilliamFiset
Рет қаралды 27 М.
Binary Search Tree Introduction
12:31
WilliamFiset
Рет қаралды 35 М.
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 3 МЛН
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 7 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН
One day.. 🙌
00:33
Celine Dept
Рет қаралды 42 МЛН
Delete a node from Binary Search Tree
18:27
mycodeschool
Рет қаралды 1,1 МЛН
AVL tree removals
8:56
WilliamFiset
Рет қаралды 56 М.
Why is Python 150X slower than C?
10:45
Mehul - Codedamn
Рет қаралды 17 М.
Binary Search Animated
7:00
Dreams of Code
Рет қаралды 37 М.
Lecture 5: Binary Search Trees, BST Sort
52:40
MIT OpenCourseWare
Рет қаралды 615 М.
Build a Binary Search Tree in JavaScript - Insert, Lookup & Remove
16:42
Priority Queue Removing Elements
14:07
WilliamFiset
Рет қаралды 46 М.
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 3 МЛН