Typescript Array Find Duplicates Leetcode Python Problems