Skip to content

Instantly share code, notes, and snippets.

@chienhsiang-hung
Created November 14, 2022 09:29
Show Gist options
  • Save chienhsiang-hung/e533d937f4db749dde5cf918785869af to your computer and use it in GitHub Desktop.
Save chienhsiang-hung/e533d937f4db749dde5cf918785869af to your computer and use it in GitHub Desktop.
Heap data structure is mainly used to represent a priority queue. In Python, it is available using the “heapq” module. The property of this data structure in Python is that each time the smallest heap element is popped(min-heap).
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment