BMO Financial Group interview question

Most challenging task to date