Typescript Array Find Duplicates Leetcode Contest Solution