Barclays interview question

How did you approach the coding problems?