Count Distinct Element Leetcode Premium