HP Inc. Interview Question

Twosum (leetcode easy) and javascript