Fortinet interview question

First step was to pass Hackerrank Test