Question d’entretien chez Amazon

Maze with DFS find time complexity