O(n!) factorial time
easy 15 minO(n!) means the work grows like n × (n - 1) × ...
Where it shows up
The same pattern appears across everyday software.
Delivery and route planning
Courier, ride-sharing and field-service companies plan stop orders for each vehicle. With a handful of stops they can check every order exactly; with dozens they switch to Held-Karp style DP, branch and bound, or local search like 2-opt, because the number of orders explodes factorially.
Testing every interleaving
Concurrency testers and model checkers explore the possible orders in which threads run their steps. The number of orders grows factorially, so tools prune equivalent orders (partial order reduction) to keep the search finite.
Scheduling and seating
Exam timetables, tournament draws and wedding seating plans are all orderings. Small cases can be solved by trying everything; real ones use constraint solvers that prune the permutation tree early.
Password and lock search spaces
Arranging k distinct symbols gives k! orders, which is why a keypad code using 6 different digits in an unknown order still has 720 possibilities. Security analysts use these counts to estimate how long a brute-force attack would take.
Circuit and chip layout
Placing components on a board or drilling holes in the best order is travelling salesman in disguise. Manufacturers rely on heuristics that get within a few percent of optimal, since exact search over n! orders is impossible for thousands of holes.