Fortinet interview question

How could you improve on your coding challenge?