Count Distinct Element Leetcode Javascript Questions Basic