Available question text
Given n courses and prerequisite pairs, determine the minimum number of semesters required to finish all courses if you can take any number of courses per semester as long as all their prerequisites are already completed; return -1 if a cycle makes completion impossible. This reduces to topological sorting / BFS layer-by-layer on the DAG to count semesters (or detecting cycles).
Related questions
Continue with questions that share topics or the same question type.
- Parallel Courses II
Coding
- Parallel Courses III
Coding · Array · Directed Acyclic Graph · Dynamic Programming
- Execute Asynchronous Functions in Parallel
Coding
- Implement a Parallel Image Processor
Coding · Concurrency · Memory Management
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Snowflake
Leetcode 1136. Parallel Courses
Reported Sep 1, 2026 · 2 source reports
MID_LEVEL, SENIOR
Source snapshot: Nov 12, 2026
View source