Pregunta de entrevista de Barclays

Two sum data structure and algorithm question