permutation
One particular ordering of a set of items; three items have six permutations.
In more detail
n items have n factorial permutations, which grows faster than exponential. The course generates them with a recursive generator that picks each remaining item in turn and recurses; itertools.permutations does the same in the standard library.
Related terms
- generator — A function that can pause and resume, producing a series of values one at a time with yield, each only when it is requested.
- backtracking — A search technique that builds a solution one choice at a time and undoes the latest choice as soon as it cannot lead to a valid solution.
- factorial — The product of all whole numbers from 1 up to n, written with an exclamation mark after n, so four factorial is 24.
Taught in
- Backtracking: Search With Pruning — Algorithms & Data Structures for Working Engineers