Pregunta de entrevista de Chubb

Leetcode two sum question as in the normal problem