> ## Documentation Index
> Fetch the complete documentation index at: https://leetcode-py.wisl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> leetcode-py is a Python LeetCode practice environment generator with one CLI: lcpy. It is not a service or platform.
> Each problem is a directory under leetcode/ with README.md, solution.py, test_solution.py, helpers.py, and playground.ipynb. lcpy gen creates them from JSON templates bundled with the package.
> Examples are backed by tests; copy them verbatim.

# Topological Sort in Python with Tests

> All 21 Topological Sort LeetCode problems with tested Python solutions.

Topological Sort holds 21 problems (13 Medium, 8 Hard).
Generate any of them into the current directory with `lcpy gen -n <number>`.

<div className="sd-catalog-table">
  | # | Problem | Difficulty | Solution |
  | - | - | - | - |
  | 207 | [Course Schedule](/problems/course-schedule) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule/solution.py) |
  | 210 | [Course Schedule II](/problems/course-schedule-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule_ii/solution.py) |
  | 269 | [Alien Dictionary](/problems/alien-dictionary) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/alien_dictionary/solution.py) |
  | 310 | [Minimum Height Trees](/problems/minimum-height-trees) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_height_trees/solution.py) |
  | 329 | [Longest Increasing Path in a Matrix](/problems/longest-increasing-path-in-a-matrix) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_increasing_path_in_a_matrix/solution.py) |
  | 444 | [Sequence Reconstruction](/problems/sequence-reconstruction) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sequence_reconstruction/solution.py) |
  | 631 | [Design Excel Sum Formula](/problems/design-excel-sum-formula) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_excel_sum_formula/solution.py) |
  | 802 | [Find Eventual Safe States](/problems/find-eventual-safe-states) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_eventual_safe_states/solution.py) |
  | 851 | [Loud and Rich](/problems/loud-and-rich) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/loud_and_rich/solution.py) |
  | 913 | [Cat and Mouse](/problems/cat-and-mouse) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/cat_and_mouse/solution.py) |
  | 1059 | [All Paths from Source Lead to Destination](/problems/all-paths-from-source-lead-to-destination) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/all_paths_from_source_lead_to_destination/solution.py) |
  | 1136 | [Parallel Courses](/problems/parallel-courses) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/parallel_courses/solution.py) |
  | 1245 | [Tree Diameter](/problems/tree-diameter) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/tree_diameter/solution.py) |
  | 1462 | [Course Schedule IV](/problems/course-schedule-iv) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule_iv/solution.py) |
  | 1857 | [Largest Color Value in a Directed Graph](/problems/largest-color-value-in-a-directed-graph) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_color_value_in_a_directed_graph/solution.py) |
  | 1976 | [Number of Ways to Arrive at Destination](/problems/number-of-ways-to-arrive-at-destination) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_ways_to_arrive_at_destination/solution.py) |
  | 2050 | [Parallel Courses III](/problems/parallel-courses-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/parallel_courses_iii/solution.py) |
  | 2115 | [Find All Possible Recipes from Given Supplies](/problems/find-all-possible-recipes-from-given-supplies) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_all_possible_recipes_from_given_supplies/solution.py) |
  | 2127 | [Maximum Employees to Be Invited to a Meeting](/problems/maximum-employees-to-be-invited-to-a-meeting) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_employees_to_be_invited_to_a_meeting/solution.py) |
  | 2392 | [Build a Matrix With Conditions](/problems/build-a-matrix-with-conditions) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/build_a_matrix_with_conditions/solution.py) |
  | 3481 | [Apply Substitutions](/problems/apply-substitutions) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/apply_substitutions/solution.py) |
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.