Pregunta de entrevista de XYZ (Turkey)

Two sum question based on arrays