Your question is Shortest Path and Components. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an undirected unweighted graph with n nodes labeled from 0 to n - 1 and an edge list edges, implement a function that returns two results: the length of the shortest path from start to end, and the number of connected components in the graph. If no path exists from start to end, return -1 for the shortest path length.
def analyze_graph(n, edges, start, end):