Skip to main content

Python implementation of range maximum query in O(logn).

Project description

rangeMaxQuery

Python's implementation of range maximum query.

Install

  • Install via $ pip install range_max_query .

How to use

  • $ from range_max_query import RangeMaxQuery .

>>> A = [2, 3, 4, 1, 7]         
>>> arr = RangeMaxQuery(A)      # initialize data structure
>>> arr.range_max_query(1, 4)     # maximum query in range(1, 4)
7
>>> arr.update(1, 10)           # set A[1] = 10 and update the data structure
>>> arr.range_max_query(1, 4)    # maximum query in range(1, 4)
10

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

range_max_query-1.0.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

range_max_query-1.0.3-py2.py3-none-any.whl (3.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file range_max_query-1.0.3.tar.gz.

File metadata

  • Download URL: range_max_query-1.0.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for range_max_query-1.0.3.tar.gz
Algorithm Hash digest
SHA256 d57f06eeb0f646635ad62da8dfb1e0ad5df1d451ccd6eec17c5c408287474f84
MD5 4cb82ef64e1f8baddb54408c34669cbd
BLAKE2b-256 13c58817e48ba6b6e144bca5d93e4d7c92cdab08f46bf5d06ddd4969d06f3296

See more details on using hashes here.

File details

Details for the file range_max_query-1.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: range_max_query-1.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for range_max_query-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2f545d0a91c330fa33b1fde067d739d31ed778c58daafc21184f984fd7c54115
MD5 658b07203878e25b0efefe06b785afc5
BLAKE2b-256 702d0b0cce245bc1f90a42062745551101e2e88f13db031fbce6fbce2db1778a

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