Pregunta de entrevista de Bloomberg

i was asked two sum leetcode question