| Crates.io | permutations_iter |
| lib.rs | permutations_iter |
| version | 0.1.1 |
| created_at | 2023-02-24 16:04:08.776581+00 |
| updated_at | 2023-02-24 19:32:21.943966+00 |
| description | Generate permutations iteratively without recursion in O(n) time. |
| homepage | |
| repository | https://github.com/acarturk-e/permutations_iter |
| max_upload_size | |
| id | 793732 |
| size | 6,310 |
An iterative permutation generator without recursion for Rust.
Iterator Permutations::of(n) generates permutations of 0..n iteratively using
Steinhaus-Johnson-Trotter algorithm with Even's modification.
Each next() call has $O(n)$ time and space complexity.
Not optimized. At all. Any improvements are welcome.
Published under MIT license.