Question: Implement a Binary Search Tree. Your class should be templated so that it can store any sort of data. The constructor for the class should
Implement a Binary Search Tree. Your class should be templated so that it can store any sort of data. The constructor for the class should take a comparison function as a function pointer as a parameter. This function will take 2 items as parameters of the type specified in the template (passed by constant reference), and return an int (-1 if the first item is less than the second item, 0 if they are equal, 1 if item 1 is greater than item 2). c++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
