Binary Search Trees - Remove Match Function - C++ - Part 12
Вставка
- Опубліковано 22 бер 2014
- In this tutorial I create a helper function that removes a non-root node from the binary search tree.
Want to learn C++? I highly recommend this book amzn.to/1PftaSt
Donate - bit.ly/17vCDFx
STILL NEED MORE HELP?
Connect one-on-one with a Programming Tutor. Click the link below:
trk.justanswer.com/aff_c?offe...
:)
Just wanted to say, you saved me! I had started my school project, and had so many open ends, I was doomed for failure. But thanks you your videos, I was able to find out where I was went wrong, and learned some things along the way. Thank you Paul!
Great job Paul. Thank you for the amazing tutorials. Can't wait for the next video
Awesome tutorial man.. You rock! I had so much trouble with deleting a node and this solved it :))))
awesome videos .. quality stuff
Is it possible to merge RemoveRootMatch() and removeMatch( , , ,) and create one function to avoid wast of code?
Paul Programming
Thank you for all the videos, Im just confused on the following:
else if(match->left != NULL && match->right == NULL){
left == true ? parent->left = match->left : parent->right = match->left;
match->left = NULL;
RemoveMatch(Parent, Parent->left, true):
are we saying that the node in parent->left->left is now the parent? so if we have 50->30->20 , we are switching out 50 with 20, and the right pointer to 30(since its greater)?
Good tutorials, just wanted to know how does the program knows what it means when left is true or false?
excellent series! a wonderful teacher. I don't understand what the purpose of Delptr is though, it seems we just create it then delete, but do nothing with it.
Do you have repository for developed code?
void value not ignored as it ought to be?
parent->left->key = key ? //error here
RemoveMatch(parent, parent->left, true):
RemoveNodePrivate(key, parent->left);