Count Distinct Elements In Array Leetcode