Skip to content

A implementation of MinMaxHeap with Python language.

License

Notifications You must be signed in to change notification settings

hfi/min-max-heap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

min-max-heap

A implementation of MinMaxHeap with Python language.

Usage

from min_max_heap import MinMaxHeap

heap = MinMaxHeap()

for i in range(100):
    heap.push(i)

for i in range(50):
    assert heap.pop_min() == i
    assert heap.pop_max() == 99 - i

assert heap.is_empty()

About

A implementation of MinMaxHeap with Python language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages