Enumerating permutations – an example of recursion

One way to solve a problem of size \(n\) is to pretend you can solve it for problems of size \(n-1\), and then use that imaginary solution to solve it for \(n\). If you can also solve the smallest instance of the problem, then what you pretended eventually becomes real. This approach is called recursion. … Continue reading Enumerating permutations – an example of recursion