Question

Given data in a list as follows H.J. K.X.A.S.d. D. W.E. Z Answer the following questions: Draw the binary search tree using t

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Algorithm for insertion:-

1) if root==null insert the new element as the root

2) start from the root

  • if the value to be inserted is less than the current node and if the left child is null insert the value as left child else move left
  • if the value is greater than the current node and if the right child is null insert the value as right child else move right

3) repeat step 2 until the value is inserted.

the final tree is w Animation Completed

Add a comment
Know the answer?
Add Answer to:
Given data in a list as follows H.J. K.X.A.S.d. D. W.E. Z Answer the following questions: Draw the binary search tre...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT