INTUIT Hiring | SWE OA (2024) | Dependency Resolution and Directed Graph Validation Using Topological Sorting
Intuit · Question · Posted Jun 2026
Q1. Course Completion Feasibility Based on Prerequisite Dependencies Problem Statement You are given n courses labeled from: 0 to n - 1 Some courses have prerequisites. A pair: [a, b] means: Course b must be completed before Course a Determine whether it is possible to complete all courses. Return: true if all courses can be completed. Return: false if a circular dependency (cycle) exists. Example 1 Input n = 2 prerequisites =[ [1,0] ] Output true Explanation 0 → 1 Take ...
The full answer & interview discussion are available to premium members.
Log in Create a free account