Skip to main content

A collection of common data structures

Project description

Quickstart

snowowl is a collection of common data structures written in Python.

The complete documentation is here.

How to install

pip install snowowl

How to use

#!/usr/bin/env python3
# author: greyshell
# description: demo Heap library

from snowowl import Heap, HeapType


if __name__ == '__main__':
    arr = [5, 9, 2]

    hmin = Heap(arr)  # create a min heap
    print(hmin.peek())  # peek the min item from the heap
    hmin.insert(1)  # insert an item into the heap
    print(hmin.remove())  # remove an item from the heap
    print(hmin)  # print all items from the heap
    print(len(hmin))  # print the length of the heap

    hmax = Heap(arr, HeapType.MAX)  # create a max heap
    print(hmax.peek())  # peek the max item from the heap
    hmax.insert(1)  # insert an item into the heap
    print(hmax.remove())  # remove an item from the heap

How to uninstall / remove

pip uninstall snowowl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snowowl-0.0.4.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

snowowl-0.0.4-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file snowowl-0.0.4.tar.gz.

File metadata

  • Download URL: snowowl-0.0.4.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.9 CPython/3.9.7 Linux/5.10.0-kali9-amd64

File hashes

Hashes for snowowl-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e3eaa3f135781b72a1d22afe3862ead1697eb5b177d60e1b25ffe6efca072b48
MD5 c67c86f4925ca0f6032e36ecd67b9701
BLAKE2b-256 fa1c082511e5f8b81013b8aca78828c476e2f1c73c9b20b02400b2ebbed8dcce

See more details on using hashes here.

File details

Details for the file snowowl-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: snowowl-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.9 CPython/3.9.7 Linux/5.10.0-kali9-amd64

File hashes

Hashes for snowowl-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7aa9374e6af90b2d1a7b878202c2d4a1f306677238ecce38f17d796329b3de25
MD5 cdc03a6f76babc6723ff8db123109333
BLAKE2b-256 65fff83a5b1b1bf841f28d6a1f7fcc4d44346e03994a75d58c800fed92912fe7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page