Pregunta de entrevista de Cadence Design Systems

Two sum first question on leetcode