System Dependency Load Factor (DAG reverse-dependency count)

Asked at Robinhood · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026

You are given a list of running programs `programs` and a 2D array `prerequisites` where `prerequisites[i] = [a, b]` means program **a depends on b** (a directed edge `a -> b`). After filtering invalid pairs, the dependency graph is a **DAG**.

Loading the problem…