Robinhood interview question

LC medium about graphs and DFS