Cadence Design Systems interview question

Graph problem.