Using C++17

Watched on YouTube the video of How to Adopt Modern C++17 into Your C++ Code and below are the notes. [more]

Permutation and cycles

Let \([n]\) be the set \(\{1,2,...,n\}\) (we call each element a vertex) and a permutation of \([n]\) be \(\pi=[\pi(1),\pi(2),\cdots,\pi(n)]\), i.e., denote \(\pi(x)=y\) the fact that in a permutation, position \(x\) has vertex \(y\). There are \(n!\) possible permutations of \([n]\). [more]