Barclays Interview Question

Pen and paper around coding algorithms