Detect and break cycles in pod dependencies
You have many pods, and a pod may depend on other pods.
- Dependencies are directed. Report whether they contain a cycle, much like checking whether a course schedule can be finished.
- 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.
No answer yet. Write the first one; the best answer gets endorsed.
