Visa Inc. Interview Question

2 sum and leet code 277