Skip to main content

A Python library for next permutation and combinatorial utilities inspired by C++ STL and Java Collections.

Project description

nextperm

A Python library inspired by C++ STL and Java Collections that provides utilities for next permutation, combinations, sorting helpers, and more.

🚀 Features

  • next_permutation, prev_permutation
  • rotate_left, rotate_right
  • is_sorted, is_sorted_until
  • lower_bound, upper_bound
  • nth_permutation, count_permutations
  • nCr, nPr, factorial
  • shuffle, swap, reverse

🧪 Example Usage

from nextperm import next_permutation, nth_permutation

print(next_permutation([1, 2, 3]))  # [1, 3, 2]
print(nth_permutation([1, 2, 3], 4))  # [2, 3, 1]

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

nextperm-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

nextperm-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nextperm-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for nextperm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6e4f41f7683a1b87bf6e4411bd538ab192263bdefd0d0a89e2d8810e1e8c55a6
MD5 5b458f9a7c5af39c02b82feac84cb859
BLAKE2b-256 3abeee324be611a583eab6d8e7474f0c07ef7b5b305249712bee771c9cb4b429

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nextperm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for nextperm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3ce054af1cc1c91850b28c00d693aca8ec02dfb7cd401402354e7e0642efe0d
MD5 c8e059b0c47e2ab0192709a11743a91b
BLAKE2b-256 58210e1cd737bf3d4512d286d581078826fcb1a5069c06e91b59ab9548828731

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