Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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 - 132

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions