Barclays interview question

Two sum data structure and algorithm question