Question: Suppose we have a Binary Search Tree that is storing the following Elements: typedef struct int id; double salary; } Element; Suppose the nodes are
Suppose we have a Binary Search Tree that is storing the following Elements:
typedef struct
int id;
double salary;
} Element;
Suppose the nodes are stored based on id. That is, every node in your left subtree has a smaller id than you and every node to the right has a larger id than you.
Give a recursive algorithm which returns the largest salary in the tree.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
