IMC Trading interview question

use dfs to traverse the graph