American Express Interview Question

Q: Two sum question from leetcode