Forescout Technologies interview question

Code the question they gave