First Republic Interview Question

Graph problem based on six degrees of separation.