Answered step by step
Verified Expert Solution
Question
1 Approved Answer
9. Consider the following declaration struct node t int zip_code; char name [20]; struct node *left; struct node *right; typedef struet node node type Provided
9. Consider the following declaration struct node t int zip_code; char name [20]; struct node *left; struct node *right; typedef struet node node type Provided that zip_code is used as the key for creating a Binary Search Tree (BST of node_type nodes, write a C function search that takes target along with the root of a BST and searches for target in the tree. If target is found, your function should copy its associated name to answer and return 1; otherwise return 0. Note that answer is the third parameter defined in function search. You may use any C library functions you choose. Ifyou write "dont grade" or leave the answer blank, we will not grade any ofyour work for this problem and you will receive 2 points int search (int target, node_type *root, char *answer)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started