Question: C++ ONLY, Include binary search tree used to test, Use exact provided interface Given a binary search tree and a number n, find the node

C++ ONLY, Include binary search tree used to test, Use exact provided interface

Given a binary search tree and a number n, find the node in the tree that contains the largest number that is less than n. If there is no value in the tree less than n then return nullptr. The binary search tree over which you will search will be given as a parameter. The Node interface is as follows: class Node { public: Node(int); ~Node(); int getValue(); std::shared_ptr getLeft(); std::shared_ptr getRight(); }; The public interface of your JltFinder class must include the following: //public constructor, receives the root of the binary search tree over which to search. JltFinder(std::shared_ptr); //search for the node with the value closest to but less than the value provided. std::shared_ptr Find(int); What to turn in: Your Student.h header. A header file named JltFinder.h. An implementation file named JltFinder.cpp. All files in a directory named implementation.

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!