ZeroFox Interview Question

Leet code two sum problem