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.0.tar.gz (1.4 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.0-py3-none-any.whl (1.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: o1twosum-0.1.0.tar.gz
  • Upload date:
  • Size: 1.4 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.0.tar.gz
Algorithm Hash digest
SHA256 47c805b96fcf5618f40a7693493636ccc0a2057f78c543b33b8da44f581a4dfc
MD5 874ca19de068501d0d81fc7307a30dee
BLAKE2b-256 00b76faf3a57f7e19082d005c9dc8a140162c0981037fafd2bcfead64a1cd0f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: o1twosum-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0474e5b80d0d08156d2b87053a5b8f83a161826c9ef22afdcf79230fb71eec2
MD5 e045fd2ef514760fe8dd44c330e4c12e
BLAKE2b-256 8560fe65f064d328e1af199bc8e6e4217005d38c76f832b04b4aa7335316565d

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