Delete a node from Binary Search Tree( Reason for every operation explained)

  Рет қаралды 97,634

Vivekanand Khyade - Algorithm Every Day

Vivekanand Khyade - Algorithm Every Day

Күн бұрын

Пікірлер: 133
@leviatanx6662
@leviatanx6662 3 жыл бұрын
Awesome explanation! Indian's are the best computer teachers, it explain everything so clearly, slowly and datailled. You gained a Subscriptor
@vivekanandkhyade
@vivekanandkhyade 3 жыл бұрын
Thanks Leviatan
@abhinavrana8157
@abhinavrana8157 6 жыл бұрын
21:55 we can use the greatest value from left subtree and substitute it in place of 12 , BST property is preserved and so is the Inorder traversal.
@myerali8257
@myerali8257 5 жыл бұрын
Exactly i wondered why he didnt explain that scenario
@aryanbisht7752
@aryanbisht7752 5 жыл бұрын
Yes.... I was also thinking the same...... I thought I might be wrong ..... but I have considered all the cases and I think things can be done in both ways
@krishnendudutta1465
@krishnendudutta1465 4 жыл бұрын
One can use either inorder predecessor(largest from left subtree) or inorder successor(smallest from right subtree). Its a choice of developer.
@bestdeal3385
@bestdeal3385 3 жыл бұрын
he is the most innocent teacher I've ever seen on youtube
@rohitbhelkar2712
@rohitbhelkar2712 4 жыл бұрын
your teaching skills are amazing. you make us understand complex problem in a very simplified way.
@exe.m1dn1ght
@exe.m1dn1ght 4 ай бұрын
Sir, you are a Master Warrior of Algorirhms ! Thank you so much I now understand thank you Sir Warrior !!
@avinashravi_
@avinashravi_ 6 жыл бұрын
You just saved my semester! Thanks brother xD
@kanchanharjani1891
@kanchanharjani1891 4 жыл бұрын
Sir, Your Teaching style is awesome. You explain concepts in a simple way making it easy to understand. Thank you so much.
@ayaramzy6815
@ayaramzy6815 3 жыл бұрын
When I see your face in any results of google .. I feel calm ... I will understand it .. you are so important like this
@vikasvishwakarma5263
@vikasvishwakarma5263 6 жыл бұрын
I am not exaggerating, but you really are the best teacher of Data structures
@AbhishekKumar-eh6zy
@AbhishekKumar-eh6zy 3 жыл бұрын
Sir, Your explanantions are the best..
@Anonymous-mm9tt
@Anonymous-mm9tt 2 жыл бұрын
Explained a complex topic by simplified method 😊
@manojbgm
@manojbgm 7 жыл бұрын
Nice video. nice explanation. I would like to correct a point that is you mentioned that you have to always take the inorder successor to replace the about to be deleted node but it is also possible to consider the inorder predecessor. Please do write back. I like the way you explain. Thank you :) good job
@Armaghan619
@Armaghan619 7 жыл бұрын
brother do u have the link of the next video?
@quickbitesitsme
@quickbitesitsme 4 жыл бұрын
is that max of the left sub tree ?
@AnjaliSharma-lq8ut
@AnjaliSharma-lq8ut 2 жыл бұрын
Thankyouuuuu sir.... I was looking for such detailed explaination
@royalegaming9801
@royalegaming9801 2 жыл бұрын
videos are in random order so, please arrange in the serial wise please.
@siddharthkshirsagar540
@siddharthkshirsagar540 4 жыл бұрын
Amazing explanation I struggled with with step to take, minimum but now it's clear thank you sir.
@Just1MorePerson1
@Just1MorePerson1 7 жыл бұрын
dang you do a really good job at explaining wish my professor was as detailed
@FredoCorleone
@FredoCorleone 6 жыл бұрын
Very very good. The best indian in the business
@rahulmehra186
@rahulmehra186 4 жыл бұрын
Great job sir keep doing
@hallvardlundehervig5508
@hallvardlundehervig5508 5 жыл бұрын
Fantastic explanation and examples sir
@johnsonmathew6008
@johnsonmathew6008 5 жыл бұрын
There is another alternative to do children deletion, bring up the left sub tree at parent place of deletion and add right node(sub-tree) towards the rightmost node of the left sub-tree, it will save the searching time
@fardilviews
@fardilviews 4 жыл бұрын
this man helps me a lot....if I find him I will treat him.....
@vrushantdomde1070
@vrushantdomde1070 5 жыл бұрын
amazing video sir ,you are great, sir , can you explain it coding
@saptarshichattopadhyay8234
@saptarshichattopadhyay8234 2 жыл бұрын
This is so helpful.. Thank you sir
@haseenashaik6198
@haseenashaik6198 6 жыл бұрын
Nice video sir...urs video helps me a lot for understanding the coding easily thank u sir...plss upload proper coding for deleting node in bst...I will be waiting for that video sir...
@chenzhuo9
@chenzhuo9 3 жыл бұрын
Great video!!! You deserve more subscribers!
@Farahat1234
@Farahat1234 6 жыл бұрын
Sir your explanation is really very very osam😍🤗
@Karthik7070
@Karthik7070 7 жыл бұрын
Video tells about deleting a node with 2 children with making Inorder successor as replacable element. Can we make Inorder predecessor also as replacable element? So at 21:56 timestamp of the video, 9 has two children a & b and Inorder predecessor of 12 will be b and we can replace b. Please correct me if I am wrong.
@foo.1396
@foo.1396 6 жыл бұрын
Nice video. I just have a simple question. For the 2-children deletion, the node with minimum value of right subtree is used for replacement. So, why can't the node with maximum value of left subtree be used?
@supamdeepbains5172
@supamdeepbains5172 6 жыл бұрын
we can replace the node with the from the left sub tree that is "maximum value in the left subtree we will move first from the parent node to the left and then keep in moving to the right to find the maximum untill we hit None .and that value will be replaced with parent node so that new value would be less as its from left subtree and being maximum we can say that all the values in the left tree of that is lesser than that
@SahilSharma-zz8nv
@SahilSharma-zz8nv 5 жыл бұрын
I would like to ask that in your delete a node in BST you asaid we can only choose the smallest from right sub-tree but we can also choose the largest from left sub-tree isn't it true ?
@AjeetKumar-mo6xt
@AjeetKumar-mo6xt 5 жыл бұрын
Yes we can replace the element to be deleted with its predecessor also
@tensu6835
@tensu6835 Жыл бұрын
I think we can replace the max number in the left subtree with the node we want to delete when we are doing with 2 children.
@hailemariamtamirat3125
@hailemariamtamirat3125 4 жыл бұрын
Great explanation in detail, thank you!!
@aqsaibrahim5561
@aqsaibrahim5561 6 жыл бұрын
nice video......thank alot your lecture helps me alot
@punitpawar1
@punitpawar1 3 жыл бұрын
where s the code for this ? I did not see a video which has the code for deletion....if you can please upload the video / share the code link , that will be great...
@citruspun
@citruspun 5 ай бұрын
awesome explanation
@sohbetdovranov9798
@sohbetdovranov9798 6 жыл бұрын
This is so helpful!!! Thank you sir!
@live_cuh_reaction
@live_cuh_reaction 3 жыл бұрын
22:14 is a good example of Heisenberg's principle.
@the-gray-haired-developer
@the-gray-haired-developer 6 жыл бұрын
nice work. Please make videos on graph and dynamic prog, greedy topics. Aur Obviously bda sahi bolte ho :)
@judisjeevan4908
@judisjeevan4908 7 жыл бұрын
its awesome sir......nice explanation
@sebinvincent4009
@sebinvincent4009 3 жыл бұрын
is there anyone thinking, for a node with 2 children, why can't we replace the node with the right child and move the left subtree as a left child to the inorder successor? In the scenario of 14:48, why can't we move 10 (along with its children) and make it as the left child of 35 whereas 30 can take the position of 20, directly connected to 50? It will preserve the properties of BST and inorder traversal.
@mirangpuri6057
@mirangpuri6057 3 жыл бұрын
The arrangement of the tree is disturbed in that case for eg 35 was connected to null but now 35 will be connected to 10 in that case .
@salmasulthana3320
@salmasulthana3320 4 жыл бұрын
you are the best sir!!!
@girardroston370
@girardroston370 6 жыл бұрын
Very clear explanation.
@anshul90100
@anshul90100 6 жыл бұрын
Hi, Like you have said find minimum in right subtree. But in your algo you are continousouly moving while(p!=nulll) { p->p.left } thats ok but with your last Tree if you delete 20 than you have replaced it with 30 but according to your algo you have to replace it with 35 i.e wrong. Please give your suggestion on it.
@haroonkuta
@haroonkuta 6 жыл бұрын
You are wrong at your own statement... 35 wasn't at left. it was at RIght... on the 30 left is NULL so the Algo found 30 the right option... while P is not equal to NULL it will naturally be the lowest number in the right sub-tree because of the property of BST
@AddieInGermany
@AddieInGermany 7 жыл бұрын
Sir but can we use inorder predecessor for replacement just like we used inorder successor ?
@NeverGiveUp_oo7
@NeverGiveUp_oo7 6 жыл бұрын
yes u can
@varsh5020
@varsh5020 6 жыл бұрын
Very useful.....Great job
@MyLifeMyWorld08
@MyLifeMyWorld08 6 жыл бұрын
Hello Sir, Where is the next video of code explanation ?
@talentamesiannasitorus3833
@talentamesiannasitorus3833 6 жыл бұрын
i like your explanation. good job.
@thebishalpaul
@thebishalpaul 3 жыл бұрын
simply loved it ❤️❤️
@digitalx788
@digitalx788 5 жыл бұрын
very clear explanation
@yogeshverma2875
@yogeshverma2875 5 жыл бұрын
After Watching Your Video I Am Able To Progarm The Deletion of a Node From The Tree...
@anushirawan
@anushirawan 4 жыл бұрын
Thank you; very helpful refresher
@dontknowwhatagoodnameis
@dontknowwhatagoodnameis 7 жыл бұрын
nice video. can you post a video about what is time complexity term means? like O(n) O(n^2) and all?
@rashidpervaiz1002
@rashidpervaiz1002 5 жыл бұрын
Please upload code of this deletion
@HemantSingh-pr7hd
@HemantSingh-pr7hd 4 жыл бұрын
Can't we find the max in the left tree similar to what you are doing with finding min in the right tree?
@SandeshMotoVlogs
@SandeshMotoVlogs 4 жыл бұрын
Yes we can find i think sir isn't aware about it
@samarthbh
@samarthbh 7 жыл бұрын
In the last case can we replace 12 which is to be deleted with maximum of the left subtree that is b?
@pawandeepchor89
@pawandeepchor89 6 жыл бұрын
Very well explained :)
@mr.anonymous6098
@mr.anonymous6098 3 жыл бұрын
Nice handwriting
@shalomabraham5229
@shalomabraham5229 4 жыл бұрын
Super class. Could you please share the code for deleting
@Farahat1234
@Farahat1234 6 жыл бұрын
God bless you sir
@pradeepasivanesan
@pradeepasivanesan 5 жыл бұрын
what happens if we delete the root?
@souravbhowmik9477
@souravbhowmik9477 4 жыл бұрын
Thank you vary much.
@satnamsatta1144
@satnamsatta1144 6 жыл бұрын
Sir plz tell if we want to delete root node in BST then how we can delete it
@dr.padmajapulicherla5545
@dr.padmajapulicherla5545 5 жыл бұрын
Plz explain a c program...for searching an element in BST N also inserting an element in BST
@aparnanandakumar2730
@aparnanandakumar2730 5 жыл бұрын
Nice video😁😁
@ShubhamTiwari-ks2qg
@ShubhamTiwari-ks2qg 3 жыл бұрын
sir in which video we can find the code
@supamdeepbains5172
@supamdeepbains5172 6 жыл бұрын
we can replace the node with the from the left sub tree that is "maximum value in the left subtree we will move first from the parent node to the left and then keep in moving to the right to find the maximum untill we hit None .and that value will be replaced with parent node so that new value would be less as its from left subtree and being maximum we can say that all the values in the left tree of that is lesser than that !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WRONG EXPLANATION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@tusharbarman1924
@tusharbarman1924 5 жыл бұрын
please dont stop making this type of videos.
@GurpreetSingh-yy5fn
@GurpreetSingh-yy5fn 3 жыл бұрын
thank u sir
@stevefrt9495
@stevefrt9495 7 жыл бұрын
thanks, nice explanation
@xiangwingrace8672
@xiangwingrace8672 6 жыл бұрын
One Correction: Deleting non leaf which has 2 nodes, replacing it with in-order predecessor will also work.
@amateurbeginner7538
@amateurbeginner7538 7 жыл бұрын
excellent but can you make a video explained the code with recursion is a little complcated , thanks for the help
@pranavbhat92
@pranavbhat92 7 жыл бұрын
Thank you for the clear explanation! :-)
@TheMiracle96
@TheMiracle96 5 жыл бұрын
/thanks a lot sir for explaining
@anuragv400
@anuragv400 4 жыл бұрын
All adobe premier pro transition effects are used in this video :)
@ruhani_choudhary
@ruhani_choudhary 7 жыл бұрын
Is there the proper code we can find by this algorithm?
@lyfokzz3848
@lyfokzz3848 7 жыл бұрын
Ruhani Choudhary tonns of codes are already being there over the internet. you can simply search over the Google.
@prashantshukla7203
@prashantshukla7203 7 жыл бұрын
on github of vivekanand sir
@ahmedabdelreheem4723
@ahmedabdelreheem4723 4 ай бұрын
thank you, sir
@ragibshahariar6852
@ragibshahariar6852 4 жыл бұрын
god bless you
@adityajha9900
@adityajha9900 3 жыл бұрын
sir at last you have teach wrong we could delete inorder predecessor there is no need to fit two children because one of the children will be just smaller than the node to be deleted
@lamcao8443
@lamcao8443 4 жыл бұрын
Amazing good job bro !!!
@RahulPatel-hr4qe
@RahulPatel-hr4qe 7 жыл бұрын
thankks you very very much i loved it
@manishshambu2612
@manishshambu2612 6 жыл бұрын
At 22:01 time... why cant we replace maximum of the left subtree?
@haroonkuta
@haroonkuta 6 жыл бұрын
we can... either maximum of left subtree or minimum in right subtree...
@nackyding
@nackyding 4 жыл бұрын
Thank you.
@ranjan19able
@ranjan19able 5 жыл бұрын
Cn you post the code for Delete a node from Binary Search Tree.
@samiramaniyar1984
@samiramaniyar1984 6 жыл бұрын
Thank you Sir
@mounikasingireddy93
@mounikasingireddy93 5 жыл бұрын
can you please explain general tree
@PramodRj
@PramodRj 5 жыл бұрын
excellent
@a_l_o_k_1991
@a_l_o_k_1991 7 жыл бұрын
awesome tutorial...where is the link of next video ???
@sagarpatil-js1fy
@sagarpatil-js1fy 7 жыл бұрын
sir can you post some videos on hashing
@Armaghan619
@Armaghan619 7 жыл бұрын
sir where is the link to the next video?
@basavarajpatil9821
@basavarajpatil9821 4 жыл бұрын
@22min Sir even right child may also have children.
@rajeshdey1441
@rajeshdey1441 5 жыл бұрын
Where is the next video As you told , for coding..
@dinosaurx6851
@dinosaurx6851 6 жыл бұрын
thanks sir
@sudhanshuagrawal8598
@sudhanshuagrawal8598 6 жыл бұрын
sir please provide the actual code of deletion in bst
@rejinapv2472
@rejinapv2472 3 жыл бұрын
we want the program also
@VY-zt3ph
@VY-zt3ph 6 жыл бұрын
Sir agar mera kisi coding company mein job laga Main sabse pehle aap hi mithai khilaoonga
@aanchalsharma5264
@aanchalsharma5264 5 жыл бұрын
Where is code
@nikhilverma882
@nikhilverma882 5 жыл бұрын
PLEASE POST CODE FOR THE SAME
@cvismenu
@cvismenu 7 жыл бұрын
Thanx
@zaryabzubair8393
@zaryabzubair8393 2 жыл бұрын
Please make video to delete root node
@MrSahilkaura
@MrSahilkaura 2 жыл бұрын
Root node is the same as deleting a node with 2 childern
@Prabhakar-bh2cv
@Prabhakar-bh2cv 6 жыл бұрын
Good
5 жыл бұрын
@ 0:01 should have been "chai peelo"
@Realme0707
@Realme0707 5 жыл бұрын
And the viewers brings and sips chai while watching video lol xD
@reassume4826
@reassume4826 6 жыл бұрын
Gem
Introduction to AVL tree (Why AVL tree is needed?)
13:04
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 53 М.
INORDER SUCCESSOR in binary search tree[CODE Explained]
21:17
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 45 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Delete a node from Binary Search Tree
18:27
mycodeschool
Рет қаралды 1,2 МЛН
INORDER PREDECESSOR in Binary Search Tree
22:51
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 42 М.
L44. Delete a Node in Binary Search Tree | BST | C++ | Java
15:48
take U forward
Рет қаралды 226 М.
AVL Tree Rotations INSERTION Examples (Left-Left , Right-Right , Left-Right, Right-Left)
37:49
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 136 М.
Diameter of a Binary Tree (Code/ Algorithm)
17:15
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 95 М.
Binary Search Trees (BSTs) - Insert and Remove Explained
6:13
colleen lewis
Рет қаралды 311 М.
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
Binary Search Tree in Data structure (Code Detail Explanation) Algorithm
17:39
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 37 М.
10.1 AVL Tree - Insertion and Rotations
43:08
Abdul Bari
Рет қаралды 1,3 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН