ProdMatch
CompaniesCitiesRolesSign in

Companies

  • Google
  • Microsoft
  • Meta
  • Amazon
  • Apple
  • Atlassian
  • Nvidia
  • Oracle
  • See all 51 →

Cities

  • Bengaluru jobs
  • Hyderabad jobs
  • Pune jobs
  • Gurugram jobs
  • Noida jobs
  • Delhi NCR jobs
  • Mumbai jobs
  • Chennai jobs
  • Remote-India jobs

Roles

  • QA / SDET Engineers
  • Backend Engineers
  • Frontend Engineers
  • Full-stack Engineers
  • Data Analysts
  • Data Engineers
  • ML / AI Engineers
  • DevOps / SRE Engineers
  • All roles →

ProdMatch

  • About
  • Career guides
  • Compare
  • Salaries
  • Skills
  • DSA practice
  • Privacy
  • Terms
  • Sign in

© 2026 ProdMatch.ai · Built for India · DPDP Act 2023 compliant · Job data sourced from official company career pages.

Back to DSA
Graphsmedium45 minPlatform Engineer

Build Dependency DAG Recovery

Platform Engineer signal: topological sort + cycle detection in a build graph scheduler context. This is a ProdMatch-owned platform engineer drill, framed as a May 2026 MoEngage Developer Platform simulation, not a copied platform question.

Company context

MoEngage · Developer Platform

Freshness

May 2026

Product surface

build graph scheduler

ProdMatch interview simulation based on product-team patterns; not a claim of a real company question.

Question

You own build graph scheduler for a Platform Engineer loop. Given targets and directed dependencies between them, return a valid execution order. If a cycle exists, return an empty list and identify that the rollout is blocked.

Input

  • n nodes labelled 0..n-1 and dependency pairs [before, after].

Output

  • A valid order of all nodes, or [] when dependencies contain a cycle.

Constraints

  • 1 <= n <= 200000
  • 0 <= dependencies.length <= 400000
  • The graph may be disconnected.

Concepts

  • build DAGs
  • tenant quotas
  • artifact caching
  • topological sort
  • cycle detection
  • dependency graph

targets: 4, deps: [[0,1],[0,2],[2,3]] -> [0,1,2,3] or [0,2,1,3]

Approach

Try framing your own approach first. The 30 seconds you think before peeking is where learning happens.

Clean Solution

Reveal the approach first.

How well did you understand?

Your rating tunes when this problem shows up again.

Common Mistakes

  • Mark visited when enqueueing, not after repeated dequeue.
  • Do not ignore disconnected components if the product surface can have them.

Next Similar Problems

Build Evidence Path FinderhardArtifacts Dependency DAG RecoveryhardArtifacts Evidence Path Findermedium