Maximum Distinct Elements Leetcode 150 Problem