Skip to content

An implementation of the max-min heap data structure in python 3.

Notifications You must be signed in to change notification settings

DeAmir/Min-Max-Heap

Repository files navigation

Max-Min-Heap

A python implementation of max-min heap.
A max-min heap is an almost complete binary tree, in which each node at even depth is bigger than (or equal to) every children of his, and each node at odd depth is lower than (or equal to) every children of it.

The user can choose to load values from a file (pass a filename as a command line argument), or give the values in the console by hand.
Practicly, the heap is an array.
After the heap is built, these are the heap operation available: extract min/max value, insert new value, delete a node (by index), (heap) sort items in the heap, print the heap, build a new one, and exit the program.

Built for python 3 and above. Input/output examples are in the Word document.

About

An implementation of the max-min heap data structure in python 3.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages