Barclays interview question

1 coding question and some HR question