Topological Sort

Problems using topological sorting

32 lessons
82 min

Lessons

1. What is Topological Sort

Pattern overview

2m

2. Prerequisites

What you need first

1m

3. When to Use

Pattern triggers

2m

4. When NOT to Use

Avoid forcing this pattern

2m

5. LeetCode 207 Course Schedule - Problem Statement

The problem

2m1 problems

6. Quiz: Cycle Detection

Test your understanding

2m1 problems

7. LeetCode 207 Course Schedule - Solution

The core idea

3m

8. LeetCode 207 Course Schedule - Example and Complexity Analysis

Walkthrough and analysis

3m

9. LeetCode 207 Course Schedule - Implementation

The approach

4m1 problems

10. LeetCode 210 Course Schedule II - Problem Statement

The problem

2m1 problems

11. LeetCode 210 Course Schedule II - Why Naive Fails

The trap

2m

12. LeetCode 210 Course Schedule II - Solution

The core idea

3m

13. LeetCode 210 Course Schedule II - Example and Complexity Analysis

Walkthrough and analysis

3m

14. LeetCode 210 Course Schedule II - Implementation

The approach

4m1 problems

15. LeetCode 1136 Parallel Courses - Problem Statement

The problem

2m1 problems

16. LeetCode 1136 Parallel Courses - Why Naive Fails

The trap

2m

17. LeetCode 1136 Parallel Courses - Solution

The core idea

3m

18. LeetCode 1136 Parallel Courses - Example and Complexity Analysis

Walkthrough and analysis

3m

19. LeetCode 1136 Parallel Courses - Implementation

The approach

4m1 problems

20. LeetCode 269 Alien Dictionary - Problem Statement

The problem

2m1 problems

21. Quiz: Building the Ordering Graph

Test your understanding

2m1 problems

22. LeetCode 269 Alien Dictionary - Why Naive Fails

The trap

2m

23. LeetCode 269 Alien Dictionary - Solution

The core idea

3m

24. LeetCode 269 Alien Dictionary - Example and Complexity Analysis

Walkthrough and analysis

3m

25. LeetCode 269 Alien Dictionary - Implementation

The approach

4m1 problems

26. LeetCode 1203 Sort Items by Groups Respecting Dependencies - Problem Statement

The problem

2m1 problems

27. LeetCode 1203 Sort Items by Groups Respecting Dependencies - Why Naive Fails

The trap

2m

28. LeetCode 1203 Sort Items by Groups Respecting Dependencies - Solution

The core idea

3m

29. LeetCode 1203 Sort Items by Groups Respecting Dependencies - Example and Complexity Analysis

Walkthrough and analysis

3m

30. LeetCode 1203 Sort Items by Groups Respecting Dependencies - Implementation

The approach

4m1 problems

31. Common Mistakes

Common errors to avoid

2m

32. Section Recap

Summary

1m

Practice Problems

Ready to start learning?

Access all 32 lessons with interactive content and progress tracking.