← Questions

Smallest valid task order from dependencies

0
AppleCodingLast asked Nov 2026

A coding interview question asked in Apple's coding round, last asked Nov 2026. It tests graphs, topological sort and heap.

There are n tasks, labelled 0 to n - 1, done one at a time. A pair [a, b] means task a must finish before task b starts.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Apple · Coding · Last asked Nov 2026

What it tests

graphs · topological sort · heap

Your code and the AI tutor open when you unlock this question.