samwgoldman/rank_permutations
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
C programs to rank and unrank k-permutations in linear time. Usage: rank n <k> Description: n is the length of the set. k is the length of the permutation. If omitted, k is set to n. k must be <= n. rank reads k numbers from stdin, which must be 0 to k - 1, separated by \n. output is the rank of the input k-permutation of n. Usage: unrank r n <k> r is the desired rank. n is the length of the set. k is the length of the permutation. If omitted, k is set to n. k must be <= n. output is the k-permutation of n of rank r.
About
rank/unrank permutations in C
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published