Fortinet Interview Question

programming problem