← Questions

DAG utility with add, validate and query

0
NotionCodingLast asked Apr 2026

A coding interview question asked in Notion's practical coding and debugging round, last asked Apr 2026. It tests graphs, topological sort and cycle detection.

Build a small helper for a directed acyclic graph, such as the task graph of a data pipeline. It must never hold a cycle: an edge that would close one is rejected.

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

What it tests

graphs · topological sort · cycle detection

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