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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file o1twosum-0.1.1.tar.gz.
File metadata
- Download URL: o1twosum-0.1.1.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92ef6199a5351133981ddb9ead511317bbf996678d2d0c81053af973244392a0
|
|
| MD5 |
6202a3671904796cdfce7c6448fe2627
|
|
| BLAKE2b-256 |
8107dc8c56cd4630cdaf7e61f220f436f29e614a36021b96ee15cc888d280777
|
File details
Details for the file o1twosum-0.1.1-py3-none-any.whl.
File metadata
- Download URL: o1twosum-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bbf454c483bccdf67c02babc0eb7cbd9b7ca035d94432bab3f2995808a61fb4
|
|
| MD5 |
c4ef3030ce6f3907dca38fae597735c7
|
|
| BLAKE2b-256 |
d569f3a2d6af4928e512b37170da8985976576487bbb1378d20b3dabeeba0769
|