Media.net interview question

Problem solving