Cisco Interview Question

2 sum. From leetcode. Not that hard