Enumerating permutations – an example of recursion

One way to solve a problem of size \(n\) is to pretend you can solve it for \(n-1\), and use that imaginary solution to solve it for \(n\). The approach is called recursion. Here’s an example showing how it works: enumerating all the ways to rearrange the elements of a list. Given a list with … Continue reading Enumerating permutations – an example of recursion

Copy and paste this URL into your WordPress site to embed

Copy and paste this code into your site to embed