Fortinet Interview Question

Maze programming problem