Question

Java class quiz question If you add ten nodes into a heap what would be the...

Java class quiz question

If you add ten nodes into a heap what would be the maximum height of the tree generated?

A. 10
B. 5
C. 4
D. 3
E. 2
0 0
Add a comment Improve this question Transcribed image text
Answer #1

nodes = 2h+1 -1

10 = 2h+1 -1

2h+1 = 11

The maximum height of the heap is 3 at that value it greater than 11.

Option d

Add a comment
Know the answer?
Add Answer to:
Java class quiz question If you add ten nodes into a heap what would be the...
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
ADVERTISEMENT