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...
    :)

КОМЕНТАРІ • 12

  • @jonathangatell1957
    @jonathangatell1957 7 років тому +2

    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!

  • @nidaabugis2487
    @nidaabugis2487 10 років тому

    Great job Paul. Thank you for the amazing tutorials. Can't wait for the next video

  • @nickbunton6707
    @nickbunton6707 8 років тому

    Awesome tutorial man.. You rock! I had so much trouble with deleting a node and this solved it :))))

  • @chakreshsingh
    @chakreshsingh 7 років тому

    awesome videos .. quality stuff

  • @chardiwall_
    @chardiwall_ 4 роки тому +1

    Is it possible to merge RemoveRootMatch() and removeMatch( , , ,) and create one function to avoid wast of code?

  • @TTorance1
    @TTorance1 10 років тому

    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)?

  • @andreshernandez-coyac2988
    @andreshernandez-coyac2988 7 років тому

    Good tutorials, just wanted to know how does the program knows what it means when left is true or false?

  • @danielgoldberg7473
    @danielgoldberg7473 3 роки тому

    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.

  • @yadhunandanark5559
    @yadhunandanark5559 6 років тому

    Do you have repository for developed code?

  • @dcmathematicsmalaysia5715
    @dcmathematicsmalaysia5715 7 років тому

    void value not ignored as it ought to be?
    parent->left->key = key ? //error here
    RemoveMatch(parent, parent->left, true):
    RemoveNodePrivate(key, parent->left);