Domanda di colloquio di Barclays

Two sum data structure and algorithm question