Skip to content

The Heap data structure in Python, with the Heap Sort algorithm

License

Notifications You must be signed in to change notification settings

ivanbgd/Heap-Data-Structure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heap-Data-Structure

The Heap data structure in Python, with the Heap Sort algorithm

Heaps are Complete Binary Trees.

The Complete Binary Max-Heap is implemented as an array, which is both fast and memory efficient. It's also easy to code.

There are two variants of heaps here: the one that uses 1-based indexing, and the other that uses 0-based indexing, into arrays. 1-based indexing is faster than 0-based.

Partial sorting is also included in the code.

Priority Queues are usually implemented as Heaps.

The code includes examples.

About

The Heap data structure in Python, with the Heap Sort algorithm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages