Maximum Distinct Elements Leetcode Python Practice