Back to problems

BST from Scratch (insert / search / delete) + Balancing Discussion

Object-Oriented Programming · Citadel · Medium

Requirements Create a C++ BST class with these public operations: insert(key): add a key to the tree. Define what your implementation does when the key is already present; this choice is yours, but state it clearly. search(key) -> bool (or a pointer to the matching node): report whether the key exists. delete(key): remove the requested key without violating the binary-search-tree ordering rule. Since delete is a C++ keyword, you may expose this operation under a valid…

Checking your access…