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.3.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.3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: o1twosum-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 fa9d94ba7997187f83aa1000e5a0ffd5725820f7b02a5cd1a9f11e80c808c87c
MD5 845af1637e865e98fbb553cd6d721d42
BLAKE2b-256 f043dc3331afe8b2f681f27acdedae6c5cca44c7a130b8005c9213d1b0e04b71

See more details on using hashes here.

File details

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

File metadata

  • Download URL: o1twosum-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 edd9a4d3ec6acc345ca3ea32d4ad4e0753588c782540c06d145b5fc1bd573708
MD5 0e9d07d40b3a6b54c9f317c96fb758a4
BLAKE2b-256 1d2613a0a0c86b2d9bf389df21410985849ffb12aecc59daf5cf0cdc821197c5

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