COMP151 - Homework 5 - Chapters 8 & 9
Assignment
Your last exam will cover the essentials ideas we’ve covered for binary trees, heaps, and priority queues. Exam questions will be similar to, or exactly like, the following questions. This is not a required assignment, your priority is the Huffman Project, but we’ll do some of this in-class and you should definitely do these to round out your studying
Problems
- Chapter 8 - Trees and Traversals
- R-8.1
- R-8.7
- R-8.20
- R-8.21
- R-8.22
- Chapter 9 - Heaps and Priority Queues
- R-9.3
- R-9.16
- R-9.17
- R-9.19
- R-9.20
- Logarithms Base 2
- Fill in the following chart, no calculator:
n | $\lfloor log_2(n) \rfloor$ | $\lceil log_2(n) \rceil$ |
---|---|---|
13 | ||
57 | ||
946 | ||
512 | ||
86 | ||
63 |