title: Dijkstra's Algorithm and Cycles
body: <p>It's stated in a book that "Dijkstra's algorithm only works with Directed Acyclic Graphs". </p>
  
  <p>It appears the algorithm works for graphs with cycles too as long as there are no negative cycles. Is that correct?</p>
  
  <p>Edit 1:
   The book "Grokking Algorithms" -Aditya Bhargava. 
   Chapter 7. Page 122.</p>