Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

k3heap

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

k3heap

k3heap is a binary min heap implemented with reference

  • 0.1.6
  • PyPI
  • Socket score

Maintainers
1

k3heap

Action-CI Build Status Documentation Status Package

k3heap is a binary min heap implemented with reference

k3heap is a component of pykit3 project: a python3 toolkit set.

In this module RefHeap is a binary min heap implemented with reference: a parent has two references to two children and a child has a parent reference to its parent.

RefHeap is not thread safe::

import k3heap

h = k3heap.RefHeap()

x = []
h.push(x)
h.push(x)  # ValueError
h.push([]) # OK

Install

pip install k3heap

Synopsis


import k3heap

h = k3heap.RefHeap([5, 1, 4, 2, 3])

while h.size > 0:
    print(h.pop())

Author

Zhang Yanpo (张炎泼) drdr.xp@gmail.com

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com

Keywords

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc