Binary Search Trees - Deleting Nodes - Part 2 - C++ - How to Delete Nodes from a Binary Search Tree

preview_player
Показать описание
In this tutorial I explain how to delete a node from a binary search tree.

STILL NEED MORE HELP?
Connect one-on-one with a Programming Tutor. Click the link below:

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

Thanks for explaining this! You did a WAY better job at explaining this than my professor with a Phd in CS

gabo
Автор

while adding u explained clearly with numbers, Thanks for that, why dont use same format for deletion also, i didnt understand deletion video, any way thanks for it.

pandurangaramayanam
Автор

By far, the clearest explanation I have come across.

byork
Автор

what a good video for BST!
thx for these

vmmznji
Автор

This has helped me understand this concept greatly man thank you

CrayonDestroyer
Автор

You earned yourself a new subscriber for very useful videos with clear explanations. Thanks mate!

shay
Автор

For the third possibility, wouldn't the opposite also work? Say we take the biggest key in the left sub tree instead?

Carlos-sycv
Автор

+Paul Programming
what about such case:

20
10
9 15
12
13

in this case, following this tutorial we would swap value from 10 with value 12, and removed node 12 at the same time forgetting about 13... Or am I missing something?

extreme
Автор

Thanks for the help you definitely did a better job than my textbook.

nathanyost
Автор

thank you for your amazing Explanation, in Case of 2 Children when we replace the Smallest Number from the right Node, we will lose the hierarchy, in Case of Family not Numbers?? what do you think ?

ElAbdu
Автор

Your videos are a lot of help. Thank you!

nicholasmullen
Автор

Thank you for this great explanation. I really appreciate it.

NyXeK
Автор

Thank you a lot. I think it would be better if you add some examples for the 3rd situation. Anyway I get it. Thank you.

dxurmrl
Автор

Great video. Very easy to understand. Thank you

BeholdJesse
Автор

Can you please please pleaase upload a splay tree tutorial using codes!

bttrflysweetheart
Автор

I've watched three of these videos so far, is there any actual coding?

claybradford
Автор

Dear Paul,
   Thank you very much for these videos. I would like to ask a question regarding the removal of a node with two children. I was playing around with some trees and I realized that the method you gave by finding the smallest key in Node's right subtree works. However, i tried another way of instead of removing like your method. I removed the node's greatest child in its left subtree. I ended up with different trees, but they all were acceptable under binary search tree rules. Can you explain. THANKS. KEEP UP THE GOOD WORK. 

TheJohnhw
Автор

can you send the link for program code in c++

vigneshvicky
Автор

To follow up from my last question, if my method was also correct, is it even possible two have two different version of a tree after a removal?

TheJohnhw
Автор

how do we know that all elements in the right are bigger than the node data itself? let's say there is a node containing the data "4" in the right side there is "8", but this has in the left side "2"., if we wanted to delete the "8", there will be "2" in the right side of "4"..

latristelagrima