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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nextperm-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 6e35b8b2834b8f30e75514b065fc3d390d977525f0543796612d94225b2e9943
MD5 ffa9400bae745ff74b7794bbc2be4448
BLAKE2b-256 886321c5a12a060fc123bf92d9f3e21dff118881bd11875e86eb4670a60a3dda

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nextperm-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c090e51c36179f6047abdbec4cbde66cb6e3e2328c0744d13d3714a8f82abdbe
MD5 8107d96b8237f1506e26381c0fbe9a02
BLAKE2b-256 08cc91572c5324af5d7a6965937603899f7a0a2598350d95e95c296147890599

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