2 Improve priority queues: d-way heaps
This chapter covers
- Solving a problem: serving tasks based on priority
- Using priority queues to solve our problem
- Implementing a priority queue with a heap
- Introducing and analyzing D-way heaps
- Recognizing use cases where heaps improve performance
In the previous chapter we have introduced some basic concepts about data structures and programming techniques, described the structure of this book, and hopefully raised your interest: you should now be aware of why developers need to know data structures.
In this chapter we will further develop those ideas and refine our narration. This chapter is meant to be a soft introduction to what is presented in this book: we have chosen a topic that should be familiar to readers with some background on algorithms, providing a review of heaps together with some new insight on branching factors.