Bloomberg Interview Question

A recursive graph algorithm question which is hard