ece 165 Dijkstra's algorithm implementation