CGI interview question

Whiteboard a simple problem