CGI interview question

Question from State management