title: Is there a difference between dfs and topological sort? Can topological ordering be achieved without using dfs?
body: <p>I was trying to write code for detecting a cycle in a directed graph and if there is no cycle then return a topological order of the same. </p>
  
  <p>While I was searching for it I came across different techniques like DFS and topological sorting to detect cycle in a directed graph.</p>
  
  <p>Is there any difference between these two? </p>