MCPcopy Create free account
hub / github.com/Dobiasd/FunctionalPlus / problem_25

Function problem_25

examples/99_problems.cpp:199–202  ·  view source on GitHub ↗

P25 (*) Generate a random permutation of the elements of a list.

Source from the content-addressed store, hash-verified

197
198// P25 (*) Generate a random permutation of the elements of a list.
199void problem_25()
200{
201 print_result(shuffle(std::random_device()(), xs));
202}
203
204// P26 (**) Generate the combinations of K distinct objects chosen from the N elements of a list
205void problem_26()

Callers 1

mainFunction · 0.85

Calls 2

print_resultFunction · 0.85
shuffleFunction · 0.50

Tested by

no test coverage detected