Typescript Array Find Duplicates Leetcode Problems Two