HP Inc. Interview Question

The two sum question on leetcode.