Meta Interview Question

a variation on a depth first search question