Implemented K Dijkstra