Factorials & Permutations

n! factorial, arranging objects in order, permutations with and without repetition. Counting ordered arrangements.

45 lessons
135 min
Codeforces: 1000-1400LeetCode: 1400-1700

Lessons

1. Intro

(The Goal)

2m

2. When Order Matters

(Arrangements vs selections)

4m

3. Counting Small Cases

(Building intuition)

3m

4. Vocabulary - Factorial

(n! means n × (n-1) × ... × 1)

3m

5. Why Factorial Counts Arrangements

(Multiplying choices)

3m

6. Factorial Examples

(Computing by hand)

3m

7. Permutations of n Distinct Objects

(The basic formula)

3m

8. Partial Permutations

(Choosing r from n)

3m

9. Vocabulary - P(n,r)

(Permutations formula)

3m

10. P(n,r) Examples

(Computing permutations)

3m

11. Permutations with Repetition

(Replacing items)

3m

12. Permutations with Repetition Formula

(n^r arrangements)

3m

13. Repetition Examples

(Passwords and codes)

3m

14. Permutations of Multisets

(Identical items)

3m

15. Multiset Permutation Formula

(Dividing by repetitions)

3m

16. Multiset Examples

(Anagrams with repeats)

3m

17. Circular Permutations

(Arranging in a circle)

3m

18. Circular Permutation Formula

((n-1)! arrangements)

3m

19. Circular Examples

(Round tables and necklaces)

3m

20. Counting Anagrams

(Rearranging letters)

3m

21. Anagram Examples

(Words with repeats)

3m

22. Derangements

(No element in original find)

4m

23. Derangement Formula

(D(n) recursive formula)

3m

24. Derangement Approximation

(D(n) ≈ n!/e)

3m

25. Quiz: Factorials and Basic Permutations

(Knowledge check)

2m1 problems

26. Problem - Permutations

(LeetCode 46)

2m1 problems

27. Permutations Approach

(Backtracking strategy)

3m

28. Permutations Pseudocode

(Recursive backtracking)

4m

29. Permutations - Implementation

(Python solution)

3m1 problems

30. Problem - Permutation Sequence

(LeetCode 60)

2m1 problems

31. Permutation Sequence Approach

(Factorial number system)

4m

32. Permutation Sequence Pseudocode

(Greedy construction)

3m

33. Permutation Sequence - Implementation

(Direct computation)

2m1 problems

34. Quiz: Multisets and Circular

(Knowledge check)

2m1 problems

35. Problem - Permutations II

(LeetCode 47)

2m1 problems

36. Permutations II Approach

(Skipping duplicates)

4m

37. Permutations II Pseudocode

(Backtracking with pruning)

5m

38. Permutations II - Implementation

(Duplicate pruning)

3m1 problems

39. Pattern - Backtracking for Permutations

(General template)

4m

40. Practice - Next Permutation

(LeetCode 31)

3m1 problems

41. Practice - Letter Case Permutation

(LeetCode 784)

3m1 problems

42. Practice - Beautiful Arrangement

(LeetCode 526)

3m1 problems

43. Application - Password Strength

(Counting possibilities)

3m

44. Application - DNA Sequences

(Biological permutations)

3m

45. Section 10 Recap

(What you learned)

2m

Ready to start learning?

Access all 45 lessons with interactive content and progress tracking.