Leetcode Problems Two Sum Solution Javascript Array Find Duplicates