Barclays interview question

prefix equation solve coding question