CME Group interview question

Write code to solve a problem problem. Done in pairs