Question: 4. (4 points - Completeness) Lookup with BST. You may have realized by now that BSTs are great for implementing lookup structures. As such, in

 4. (4 points - Completeness) Lookup with BST. You may have

4. (4 points - Completeness) Lookup with BST. You may have realized by now that BSTs are great for implementing lookup structures. As such, in this question, we wish to implement a Set using Binary Search Trees. You should assume that the bst class is fully implemented, and you will use it to implement the Set class. Given below are the headers to a C++ Set class and the bst container with methods to support search, insert, delete and traverse. (implementation details omitted): template class Set [ private: template : class bst public: :// returns true if found, false if not bst *tree; public: :bool search (const T& value) Set) :I/ ignores if duplicate : bool insert (const T& value); tree = new bst(); :// removes value if present :void delete (const T& value); /* remove the specified value from the Set if it exists. returns: true if element was removed // values from in-rder traversal false if it was not found :vector

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!