Barclays interview question

Asked on H C Vault