Implementation of A*, Dijkstra and Prim's Algorthm