Implementation of A*, Dijkstra and Prim's Algorithm