Question 1 Hint: use an explicit stack. Question 2 Hint (diameter): to compute the diameter, pick a vertex s; run BFS from s; then run BFS again from the vertex that is furthest from s. Hint (center): consider vertices on the longest path. Question 3 Hint: use depth-first search and piece together the cycles you discover.