title: Best algorithm for detecting cycles in a directed graph
body: <p>Is there an efficient algorithm for detecting cycles within a directed graph?</p>
  <p>I have a directed graph representing a schedule of jobs that need to be executed, a job being a node and a dependency being an edge. I need to detect the error case of a cycle within this graph leading to cyclic dependencies.</p>