Question d’entretien chez LinkedIn

a typical dfs question with complexity analysis