Resource · Guide or article
Permutations
Covers permutations with and without repetition and their counts, a companion to the combinations page in the same repository.
Reviewed
Open the original: Permutations (opens the original site in a new tab)Add to a roadmap
Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.
Source content: English
When the order doesn't matter, it is a Combination. When the order does matter it is a Permutation. "The combination to the safe is 472". We do care about the order. 724 won't work, nor will 247. It has to be exactly 4-7-2.
PrepKit overview
PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.
- Suited to
- The source does not state a level
- Format
- Cheatsheet
What it covers
- Permutations without repetitions: all orderings of ABC and the n! count.
- Permutations with repetitions: the lock example and the n^r count.
- Cheatsheet section with overview images.
How to use it
PrepKit study advice, not a claim made by the source.
Write a recursive function listing all permutations of ABC, then of AABC, and compare the counts with n!.
Scope and limitations
No algorithm walkthrough or code discussion. The cheatsheet is image-only, and links include the author's Medium article.
Access and format
English README on GitHub (trekhleb/javascript-algorithms, MIT); free to read.
Reviewed by PrepKit on Oct 2, 2026. Listing source commit: 85293e3e2b88
Evidence behind this overview
- src/algorithms/sets/permutations/README.md
Pages that include this
Get the PrepKit newsletter
Optional. You don't need it to use PrepKit.