Barclays Interview Question

prefix equation solve coding question