For all exercises this week, use the adjacency list graph representation discussed in the lecture.
Write a function that takes a graph and returns true if the graph is connected.
Write a function that takes a (possibly undirected) graph and returns true if the graph contains a cycle.
Write a function that takes an undirected graph and returns true if it is a tree.
Write a function that takes a graph and two vertex ids and returns an integer representing the length of the shortest path between the vertices.
Write a program that reads a list of blocked squares on an 8 x 8 chessboard, plus a starting and ending position. The program should report whether it is possible for a king to travel from the starting to the ending position without passing through any blocked square.
Modify the previous program to report the number of moves the king must make from the starting to the ending square.
Modify the previous program to print the actual path the king must take.