Skip to content

AEnguerrand/th-generate-permutations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

th-generate-permutations

Build Status CPP

Tsinghua project - Generate all permutations

Dependencies

  • C++ 14 Compiler
  • CMake (>= 3.9)

Build and run

Linux or MacOs

git clone https://github.com/AEnguerrand/th-generate-permutations.git
cd th-generate-permutations
mkdir build
cd build
cmake ..
cmake --build .
./th-generate-permutations

Example usage:

./th-generate-permutations <length of the list> <generator type>(optional) <no print all permutations>(optional)

Print all permutation with lenght of 4 (use Heap's)

./th-generate-permutations 4

Print all permutation with lenght of 5 and use Lexicographical

./th-generate-permutations 5 2

Print only number of permutation with lenght of 7 and use Heap's

./th-generate-permutations 7 1 0

Print only number of permutation with lenght of 7 and use Lexicographical

./th-generate-permutations 7 2 0

About

Tsinghua project - Generate all permutations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published