Sollicitatievraag bij Bloomberg

A recursive graph algorithm question which is hard