Fortinet interview question

Maze programming problem