Barclays Interview Question

typical math and programming problems