Modify the DeleteNode function so that it uses the immediate successor (rather than the predecessor) of the
Question:
Modify the DeleteNode function so that it uses the immediate successor (rather than the predecessor) of the value to be deleted in the case of deleting a node with two children. You should call the function PtrToSuccessor that you wrote in Exercise 21.
Exercise 21
Write a function called PtrToSuccessor that finds a node with the smallest key value in a tree, unlinks it from the tree, and returns a pointer to the unlinked node.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
C++ Plus Data Structures
ISBN: 9781284089189
6th Edition
Authors: Nell Dale, Chip Weems, Tim Richards
Question Posted: