Graph Search and shortest path via Dijkstra