Barclays Interview Question

Running total