Hassan's assignment 2. Includes the algorithm to find the shortest path as well.