Chubb Interview Question

Leetcode two sum question as in the normal problem