Your question is Shortest Professional Connection Path. 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 graph of professional connections, find the shortest path between two individuals. The input consists of connections, a list of pairs [a, b] representing mutual connections, and two strings start and target. Return the shortest path as a list of names from start to target, or an empty list if no path exists.
def shortest_connection_path(connections, start, target):