A simple implementation of dijkstra's algorithm with min-heap