Question

Draw the binary search tree that results from starting with an empty tree and a. adding 50 72 96 94 26 12 11 9 2 10 25 51 16
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Binary search tree:

Element with less value compared to root, resides at left of root, and larger values element resides at right side of the root.

(Page 1) elements > 50,72,96,94, 26, 12, 11,9,2, 10 25,51, 16, 17, 95 Insert 507 (50 Insert 72 - 72 >50 [right of 5o 50 (72 I

(Page 2) 26 <50 Insert 26 (96 94 Indert R2 R626 50 72 96 94 Inbert 11 : KR 0 94 Incert 9 q<l 72 96 94

L Page 3 Insert 2 : 229 50 26 44 Insert 10 1079 (Right of 9) 72 96 94 Insert 253 2571 (right of 12) 196 94

[Page 4 SL so but Indert 512 513 50 but <72 left of 72) 50 (51 96 94 O Indert 16 : 16 <25 Clofe of 25) 96 94 Inbert 17 17> 16

[ Page - 53 Indert 95 :- 95 794 (Right of 94) final tree :- 50 (72) 26 (96 12 51 11 25 (94 (16) (95 2 10 17

b) Similarly [Page - 6 - 95, 17, 16, 51, 25, 10, 2,9, 11, 12, 26, 94, 96,72,50 (15) (17) 96 (16 (51 94 (10) Q5 (72 12 (so

[Page 7 c) 10, 72, 96, 94,85, 78, 80, 9, 5,3,1,15, 18, 37,47 to 9 (72 5 19 6 3 18. (94 7 85 (47 78 (80)

NOTE: HOMEWORKLIB POLICY,,,, ONE QUESTION AT A TIME. STILL I HAVE DONE 3.

PLEASE UPVOTE.

Add a comment
Know the answer?
Add Answer to:
Draw the binary search tree that results from starting with an empty tree and a. adding...
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