Sorry! We could not find what you were looking for

Try going back to the main page here

 
4
4
0
0
0
0

Binary Search Tree REMOVE Operation

template <class Comparable> void BST<Comparable>:: remove (const Comparable & x, BinaryNode<Comparable> * & t) { if (t == NULL) return; if (x < t->element) remove (t->left); else if (x > t->element) remove (t->right); else if (t->left != NULL && t->right != NULL) { t->element = findMin (t->right)->element; remove (t->element, t->right); } else { BinaryNode<Comparable> *oldNode = t; t = t->left != NULL ? t->left : t->right; delete oldNode; } }
Wednesday, 05-Jan-2000 15:47:29 EST

Sorry! We could not find what you were looking for

Try going back to the main page here

 
4
4
0
0
0
0

Sorry! We could not find what you were looking for

Try going back to the main page here

 
4
4
0
0
0
0