Update dijkstra_algorithm.coffee

Not sure i broke something but some things seemed to have been unnecessarily complicated...