onsider a binary search tree with each node of the
type struct node as shown below.
struct node
{
struct node* leftPtr;
int data;
struct node* rightPtr;
}
void Find_Smallest_Non_Leaf_Node_Value(struct node* treePtr,
int* smallest)
Write a recursive C
function Find_Smallest_Non_Leaf_Node_Value that
takes the address of the root node of this binary search tree and
the address of an integer initialized to 0 as input arguments. The
recursive C function should access each node of the binary tree and
detect the smallest value of data member stored in a non-leaf node
(node with at least one child) of the tree. The value should be
stored into the memory location assigned to the
variable smallest upon exiting the function for
the last time. You may assume that the value of all data members in
the tree are greater than 0.
onsider a binary search tree with each node of the type struct node as shown below. struct node { struct node* leftPtr;
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
onsider a binary search tree with each node of the type struct node as shown below. struct node { struct node* leftPtr;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!