Barclays interview question

Wasn't difficult, was pretty straight forward