Joom Interview Question

Write code to detect cyclic dependencies in a given dependency tree