Vanguard interview question

Write some code to solve a problem