Light Pharma Pvt interview question

Maze problems and DFS code implementation