Eightfold Interview Question

leetcode question, using dfs another is using stack