Barclays interview question

Running total