You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

min-max-heap

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

min-max-heap

A implementation of MinMaxHeap with Python language.

1.0.1
pipPyPI
Maintainers
1

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()

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts