Barclays interview question

Balanced expression Producer consumer problem Threading