# Course Schedule

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/3313/course-schedule
Source observed: 2026-11-04T22:21:39.125Z
Last checked: 2026-11-04T22:21:39.125+00:00
Indexed: 2026-11-05T03:50:15.997+00:00

---

# Course Schedule

**Difficulty:** Medium  
**Category:** Data Structures & Algorithms; Coding

## Problem

You are given `numCourses` and a list of `prerequisites`. Each `prerequisites[i] = [a_i, b_i]` means you must complete course `b_i` before taking course `a_i`.

Write a function `canFinish` that returns `True` if it is possible to finish all courses and `False` otherwise. You must complete every course for the result to be `True`.

Assume there are no duplicate prerequisites and `numCourses` is non-negative.

## Examples

```text
Input: numCourses = 3, prerequisites = [[2, 1], [1, 0]]
Output: True
Explanation: You can complete course 0 first, then course 1, and finally course 2.

Input: numCourses = 4, prerequisites = [[3, 2], [2, 1], [1, 0], [0, 3]]
Output: False
Explanation: The prerequisites form a cycle, making it impossible to finish all courses.

Input: numCourses = 5, prerequisites = [[4, 2], [3, 1], [2, 0]]
Output: True
Explanation: You can complete the courses in order from course 0 to course 4.
```

No community answers have been contributed. The page includes a locked Solution tab, a Community tab, hints, an editor, output and test-results panels, and a sign-up requirement to run code: [Sign up to run code](https://www.aced.io/signup?src=lesson).

## Interview metadata

The question is associated with 18 interviews and was last reported asked 2 months ago. Listed roles include Software Engineer (15), Data Scientist, Data Engineer, and Machine Learning Engineer. Listed companies include Amazon (3), Lumos, Stripe, LinkedIn, Google, Anduril, Meta, Bloomberg, Fuse Energy, Apple, Salesforce, Twilio, TikTok, Oracle, Netflix, and Wish.

## Interview experiences

12 shared experiences are shown:

- **Lumos · 2 months ago — Software Engineer · Mid Level / L4:** The screening began with prior experience, background, and technical projects, then explored contributions, technologies, challenges, problem-solving, technical foundation, hands-on experience, and clear explanation.
- **Stripe · 2 months ago — Software Engineer · Intern:** The process was described as structured, collaborative, and focused on problem-solving, programming, trade-offs, reasoning, and feedback. The contributor wanted clearer expectations for each technical stage. [Read the experience](https://www.aced.io/experiences/stripe-software-engineer-intern-interview-946265).
- **LinkedIn · 3 months ago — Software Engineer · Mid Level / L4:** Interviews were scheduled over 2–3 days and included a phone screen, DS round, DS with AI, system design, and hiring-manager round. [Read the experience](https://www.aced.io/experiences/linkedin-software-engineer-interview-8739c8).
- **Google · 3 months ago — Software Engineer · Intern:** The contributor thought aloud throughout the process and discussed the intern role and teams at the end. [Read the experience](https://www.aced.io/experiences/google-software-engineer-intern-interview-604777).
- **Anduril · 4 months ago — Software Engineer · Mid Level / L4:** The first coding round was described as easy; the contributor recommended reviewing LeetCode and identifying patterns. [Read the experience](https://www.aced.io/experiences/anduril-software-engineer-interview-6afb2b).
- **Meta · 5 months ago — Software Engineer · Intern:** The contributor described a shorter intern process and ranking by DSA scores. [Read the experience](https://www.aced.io/experiences/meta-facebook-software-engineer-intern-interview-c5f482).
- **Bloomberg · 10 months ago — Software Engineer · Entry Level / L3:** The contributor described a long process without direct recruiter interactions and rejection despite solving the second round in several ways. [Read the experience](https://www.aced.io/experiences/bloomberg-software-engineer-interview-4236da).
- **Amazon · 10 months ago — Software Engineer · Intern:** The process included an online assessment with 2 coding questions, multiple-choice leadership-principles questions, then two one-hour interviews with about 40 minutes of live coding and 20 minutes of CV and competency questions. [Read the experience](https://www.aced.io/experiences/amazon-software-engineer-intern-interview-0fe962).
- **Fuse Energy · 2 years ago — Software Engineer · Senior / L5:** The contributor described a recruiter screen followed by a system-design phone interview. [Read the experience](https://www.aced.io/experiences/fuse-energy-senior-software-engineer-interview-765173).
- **Netflix · 2 years ago — Software Engineer · Entry Level / L3:** The contributor described interviews as easy and focused on whether the candidate seemed smart and genuine. [Read the experience](https://www.aced.io/experiences/netflix-software-engineer-interview-8655ca).
- **Wish · 3 years ago — Software Engineer · Mid Level / L4:** The process involved regular coding and writing two runnable solutions. [Read the experience](https://www.aced.io/experiences/wish-software-engineer-interview-c8b50b).
- **Amazon · 3 years ago — Software Engineer · Entry Level / L3:** The contributor described a positive interview discussion. [Read the experience](https://www.aced.io/experiences/amazon-software-engineer-interview-8fb13a).

## Related question

- [Course Schedules II](https://www.aced.io/questions/7177/design-course-scheduling-system)

## Related courses

![Machine Learning Engineer Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/6UfkHxUyLQVfDHSfLNQtWa/1be1539a65b4f6f15201f5b573c0a578/ML_Engineer_Interview_Prep_Course.jpeg?w=800&h=800&fm=webp&q=75)

### [Machine Learning Engineer Interview Prep](https://www.aced.io/courses/ml-engineer)

We cover mock interviews, frameworks, senior-candidate advice, ML system design, core concepts, coding, behavioral interviews, and more for roles at Meta, Google, Amazon, Apple, Microsoft, Nvidia, and other companies.

![Data Science Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/3U4C5C0OkDR0UeGch4AmlE/7ad489430b676a088cb973307fe77884/Data_Science_Interview_Prep_Course.jpeg?w=800&h=800&fm=webp&q=75)

### [Data Science Interview Prep](https://www.aced.io/courses/data-science)

We cover mock interviews, frameworks, senior-candidate advice, statistics, experimentation, coding, SQL, machine learning, behavioral interviews, and more for roles at Google, Amazon, Microsoft, Meta, Apple, and other companies.

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F3313%2Fcourse-schedule&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F3313%2Fcourse-schedule). Opening a form does not execute a tool.