Bloomberg interview question

1. an easy DFS 2. a different hierarchy problem