Barclays interview question

Technical