Question
Please write in c language. Create a data structure of a binary search tree where integer type elements will be kept. According to this: a)
Please write in c language.
Create a data structure of a binary search tree where integer type elements will be kept. According to this: a) Write an addition function to add elements to the tree. b) Write the function that prints all the elements at the level entered by the user on the screen. c) Write the function that prints the number of steps the element entered by the user, and if the element is not found in the tree. d) Write the function that gives the average of leaf nodes. e) Write the function that prints nodes larger than the value entered by the user on the screen.
105 87 126 74 95 117 132 45 80 90 100 b) Level 2 staff: 74 - 95 - 117 - 132 c) 1) 80 Elements found in 4 steps. 2) Element 60 not found! d) Average of leaf nodes: 94 e) Elements larger than 98: 105 - 100 - 126 - 117 - 132Step 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