Skip to main content

Heaps

  • Chapter
  • First Online:
Data Structures and Algorithms with Python

Part of the book series: Undergraduate Topics in Computer Science ((UTICS))

  • 471k Accesses

Abstract

The word heap is used in a couple of different contexts in Computer Science. A heap sometimes refers to an area of memory used for dynamic (i.e. run-time) memory allocation. Another meaning, and the topic of this chapter, is a data structure that is conceptually a complete binary tree. Heaps are used in implementing priority queues, the heapsort algorithm, and some graph algorithms. Heaps are somewhat like binary search trees in that they maintain an ordering of the items within the tree. However, a heap does not maintain a complete ordering of its items. This has some implications for how a heap may be used.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kent D. Lee .

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Lee, K.D., Hubbard, S. (2015). Heaps. In: Data Structures and Algorithms with Python. Undergraduate Topics in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-319-13072-9_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-13072-9_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-13071-2

  • Online ISBN: 978-3-319-13072-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics