Question: Data structure ( C++ ). I want to ask If my answer for this question is correct or not ? 6. Write an algorithm of
Data structure ( C++ ). I want to ask If my answer for this question is correct or not ?
6. Write an algorithm of Searching of Minimal and Maximal Keys in the Binary Search Tree;
MINIMUM(x)
{
While (left[x]!=nil)
x=left[x];
Return x;
}
MAXIMUM(x)
{
While (right[x]!=nil)
x=right[x];
Return x;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
