← Questions

Detect and break cycles in pod dependencies

0
Together AICodingLast asked Feb 2026

You have many pods, and a pod may depend on other pods.

  1. Dependencies are directed. Report whether they contain a cycle, much like checking whether a course schedule can be finished.
  2. Now treat each dependency as an undirected edge. Report whether there is a cycle, and if there is, return one edge whose removal breaks it.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding