Barclays interview question

Medium level questions only asked