factorial
The product of all whole numbers from 1 up to n, written with an exclamation mark after n, so four factorial is 24.
In more detail
It counts the orderings of n items, which is why it appears in the comparison-sorting lower bound and in permutation search. It grows even faster than 2^n.
Related terms
- permutation — One particular ordering of a set of items; three items have six permutations.
- comparison sort lower bound — The proven fact that any sort that only compares pairs must make at least about n log n comparisons in the worst case.
Taught in
- Comparison Sorts: Insertion, Merge And Quicksort — Algorithms & Data Structures for Working Engineers
- Backtracking: Search With Pruning — Algorithms & Data Structures for Working Engineers