Two Sigma Interview Question

Basic graph theory (BFS, DFS) and dynamical programming.