Dijkstras shortest path working

also made the visualizer update automatically after an algorithm
finishes.