Advertisement

Heaps

  • James T. StreibEmail author
  • Takako Soma
Chapter
Part of the Undergraduate Topics in Computer Science book series (UTICS)

Abstract

This chapter begins by first examining heaps. Then it looks at how heaps can be used to create priority queues followed by how they can also be used to create the heap sort. Although both are implemented using arrays, drawings of both trees and arrays are included to help illustrate the concepts. After introducing the priority queue a test program is included. Then the heap sort is introduced first as a simplified sort and then modified to show the complete heap sort is implemented. Lastly, a complete program simulating how a priority queue might be used in printing is presented.

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.Illinois CollegeJacksonvilleUSA

Personalised recommendations