Pregunta de entrevista de FanCraze

Two sum of leetcode question