ZeroFox interview question

Leet code two sum problem