CGI interview question

2 coding question and oops , data structure