Update dijkstra_algorithm.coffee

Not sure i broke something but some things seemed to have been unnecessarily complicated...
Merge pull request #1 from martinheidegger/patch-1

Update dijkstra_algorithm.coffee