Simple Implementation of Djikstra's Algorithm