Skip to main content

Algorithmic O(1) streaming Two Sum solver using bitwise intersection.

Project description

O1TwoSum

An experimental Python library achieving algorithmic O(1) Time and Space complexity for the Two Sum problem over data streams.

Note: Limited to integers 0-50. Leverages parallel bitwise intersection. While algorithmic O(1), it relies on Python's arbitrary-precision integers under the hood.

Usage

from o1twosum import O1TwoSum

system = O1TwoSum()
system.ingest(2)
system.ingest(11)

print(system.query(13)) # Output: (2, 11)

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

o1twosum-0.1.4.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

o1twosum-0.1.4-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file o1twosum-0.1.4.tar.gz.

File metadata

  • Download URL: o1twosum-0.1.4.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for o1twosum-0.1.4.tar.gz
Algorithm Hash digest
SHA256 cc2ffe8298e8fadb73bc6d9ae89f69d4cdb80ae4c633817ed057db4a8d2387b4
MD5 8e71f92932f26e2cd87d976d4f5f266b
BLAKE2b-256 8524787fe3a88f28651c59d32c96be6a7c5d640a466e45ba4174b7a160cbcae0

See more details on using hashes here.

File details

Details for the file o1twosum-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: o1twosum-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for o1twosum-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 057f5b8245f42deda5cb700a22a6b5b6cbc78bcad8b60a81a8a00d4e7ed669ff
MD5 6cd611fec9106edd7c5dcf19fdf1bc64
BLAKE2b-256 4f5f25f62aa5f6ec866fb3aa8ea6a455377a87aa553fc0c89f8774ae869c5189

See more details on using hashes here.

Supported by

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