Parallel Courses III
A hard-tier problem at 67% community acceptance, tagged with Array, Dynamic Programming, Graph. Reported in interviews at Acko and 6 others.
Parallel Courses III is a hard graph problem that hits the desk at Acko, Snowflake, Two Sigma, Citadel, Snap, TikTok, and Stripe. You're given a DAG of courses with durations and prerequisites. The trap: you need to find the minimum time to complete all courses when you can take them in parallel, subject to dependency constraints. Most candidates either miss the topological ordering or fail to compute the critical path correctly. This isn't a straightforward BFS. If you freeze on the pattern during your live OA, StealthCoder solves it in seconds, invisible to the proctor.
Companies that ask "Parallel Courses III"
Parallel Courses III is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made by a working Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE.
Get StealthCoderThe core insight is that this combines topological sort with dynamic programming on a DAG. You can't just sum course durations. Instead, you compute the earliest finish time for each course by taking the maximum of (finish time of all prerequisite courses) plus the current course duration. Build an adjacency list and in-degree array, then process nodes in topological order using Kahn's algorithm or DFS. The trick most people miss: the answer is the maximum finish time across all courses, not the sum. Many candidates confuse this with critical path analysis on project networks, which it is, but the DP formulation matters. If you haven't drilled the exact topological-sort-plus-DP combo, StealthCoder surfaces a working solution immediately.
Pattern tags
You know the problem.
Make sure you actually pass it.
Parallel Courses III recycles across companies for a reason. It's hard-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made by a working Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Parallel Courses III interview FAQ
Is Parallel Courses III actually a topological sort problem?+
Yes, topological sort is necessary but not sufficient. You need topological sort to process courses in valid order, then DP to compute earliest finish times. Many candidates try greedy or BFS without the DP layer and fail test cases with complex dependency chains.
What's the main pitfall candidates hit?+
Confusing total time with critical path time. Summing all course durations is wrong. The answer is the longest path through the dependency graph weighted by course duration. You compute the finish time of each course as max(prerequisite finish times) plus current duration.
How does this relate to Array and DP in the topic list?+
The array is your input (course durations and prerequisite lists). DP is the state: dp[i] = earliest finish time for course i. You fill this array by processing courses in topological order, updating each based on its prerequisites.
Is a 66.7% acceptance rate high for a hard problem?+
Yes, significantly higher than typical hard problems. This suggests the pattern, once seen, is relatively straightforward to code. But many candidates don't see it under interview pressure, which is why the companies asking it (Stripe, Two Sigma, etc.) expect clean topological DP solutions.
Should I use Kahn's algorithm or DFS for topological sort here?+
Both work. Kahn's (BFS-based with in-degrees) is often cleaner for DP state updates because you process all prerequisites before a node. DFS with memoization also works but requires careful handling of the finish-time computation. Pick whichever you code faster.
Want the actual problem statement? View "Parallel Courses III" on LeetCode →