FastPrepCourse Schedule
Problems/Course Schedule

Course Schedule

Plaud logoPlaud● MediumNEW GRADONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Plaud asked this in the third round of the same new-grad onsite, after some behavioral questions. The candidate described it only as a topological-sort question similar to a well-known public course-scheduling problem.

So the problem follows that well-known public version: given courses and prerequisite pairs, decide whether every course can be finished. We used the public version as is, since the exact variant asked is not known, with its usual limits (up to 2000 courses and 5000 unique prerequisite pairs, a true or false answer).

Our version is about 70% the same as the reported question.

There are numCourses courses, labeled 0 to numCourses - 1. prerequisites[i] = [ai, bi] means you must take course bi before course ai.

Return true if you can finish all the courses, and false otherwise.

Function

canFinish(numCourses: int, prerequisites: int[][]) → boolean

Examples

Example 1

numCourses = 2prerequisites = [[1,0]]return = true
  • Course 1 needs course 0. Take course 0, then course 1.

Example 2

numCourses = 2prerequisites = [[1,0],[0,1]]return = false
  • Course 1 needs course 0 and course 0 needs course 1, so neither can be taken first.

Example 3

numCourses = 4prerequisites = [[1,0],[2,1],[3,1],[3,2]]return = true
  • One valid order is 0, 1, 2, 3: every course comes after all of its prerequisites.

Constraints

  • 1 <= numCourses <= 2000
  • 0 <= prerequisites.length <= 5000
  • prerequisites[i].length == 2
  • 0 <= ai, bi < numCourses
  • All the pairs prerequisites[i] are unique.

More Plaud Onsite Interview questions

  • Evaluate DivisionONSITE INTERVIEW · Seen Nov 2026

Similar questions at other companies

  • Course ScheduleAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Course ScheduleFlexTrade · ONSITE INTERVIEWFlexTrade interview questions
  • Course ScheduleBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Can All Courses Be FinishedC3.ai · ONSITE INTERVIEWC3.ai interview questions
  • Trace Terminal Company OwnershipPalantir · ONSITE INTERVIEWPalantir interview questions
  • Course ScheduleNykaa · PHONE SCREENNykaa interview questions
  • Course Schedule FeasibilityTesla · PHONE SCREENTesla interview questions
  • Can You Finish All Courses?Intuit · OAIntuit interview questions
  • Course Schedule Cycle DetectionGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Island Count and Maximum AreaOracle · ONSITE INTERVIEWOracle interview questions

Interview reports that mention this question

  • Plaud New Grad SWE Onsite Interview Experience: 1 Experience
See Plaud hiring insights
Saved
class Solution {
    public boolean canFinish(int numCourses, int[][] prerequisites) {
        // Write your code here.
    }
}
Checking account…