Pergunta de entrevista da empresa Microsoft

I was asked leetcode Two sum