Cs 20a c data structures assignment closest value in a


Data Structures Assignment: Closest Value in a Binary Search Tree

In this assignment, you will create a new method called closestValue(...) that takes a value as an argument and then locates the value in the binary search tree (BST) that is closest to that argument.  If the root of the tree is NULL, your method should throw an exception.  You may not use an iterator for this assignment.

T BST::closestValue(T value);

For example, consider the following BST:

1319_Assignment Files.png

HINT: The value returned will come from the nodes found on the path followed, as if the parameter is getting inserted into the tree.

Attachment:- Assignment Files.rar

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Cs 20a c data structures assignment closest value in a
Reference No:- TGS02269287

Expected delivery within 24 Hours