⚡️ Tryprepforge
Backend Engineering Senior programming

LeetCode #207 - Course Schedule\nYou are given an array of prerequisites where prerequisites[i] = [a, b] indicates that to take course a you must first take course b. Return true if you can finish all courses.\n\n**Input:**\nnumCourses = 2, prerequisites = [[1,0]]\n**Output:**\ntrue\n\n**Constraints:**\n1 <= numCourses <= 2000\n0 <= prerequisites.length <= 5000\nprerequisites[i].length == 2\nAll prerequisite pairs are unique.

Suggested Answer

Practice More Questions Like This

Generate unlimited interview questions with structured answers, code formatting, and immersive audio explanations.

No credit card required

More Backend Engineering Interview Prep

Link copied to clipboard