Enumeration LeetCode Problems: All 80,
With Python Solutions

Every problem in this library that LeetCode tags Enumeration. 75 of them carry a complete Python solution, a worked example and the time and space complexity of the approach.

Easy
20
Medium
40
Hard
20

Enumeration problems by difficulty

Problems with a complete Python solution are listed first, then by ascending problem number.

Easy (20)

Easy problems
No.Problem
1534Count Good Triplets
1566Detect Pattern of Length M Repeated K or More Times
1863Sum of All Subset XOR Totals
1925Count Square Sum Triples
1952Three Divisors
1995Count Special Quadruplets
2094Finding 3-Digit Even Numbers
2259Remove Digit From Number to Maximize Result
2309Greatest English Letter in Upper and Lower Case
2367Number of Arithmetic Triplets
2427Number of Common Factors
2437Number of Valid Clock Times
2605Form Smallest Number From Two Digit Arrays
2765Longest Alternating Subarray
2778Sum of Squares of Special Elements
2843Count Symmetric Integers
2928Distribute Candies Among Children I
2951Find the Peaks
2970Count the Number of Incremovable Subarrays I
0800Similar RGB ColorPremium

Medium (40)

Medium problems
No.Problem
0204Count Primes
0816Ambiguous Coordinates
0845Longest Mountain in Array
0869Reordered Power of 2
0949Largest Time for Given Digits
0970Powerful Integers
1291Sequential Digits
1620Coordinate With Maximum Network Quality
1625Lexicographically Smallest String After Applying Operations
1638Count Substrings That Differ by One Character
1849Splitting a String Into Descending Consecutive Values
1958Check if Move is Legal
2018Check if Word Can Be Placed In Crossword
2044Count Number of Maximum Bitwise-OR Subsets
2048Next Greater Numerically Balanced Number
2162Minimum Cost to Set Cooking Time
2171Removing Minimum Number of Magic Beans
2212Maximum Points in an Archery Competition
2232Minimize Result by Adding Parentheses to Expression
2240Number of Ways to Buy Pens and Pencils
2249Count Lattice Points Inside a Circle
2261K Divisible Elements Subarrays
2310Sum of Numbers With Units Digit K
2397Maximum Rows Covered by Columns
2443Sum of Number and Its Reverse
2708Maximum Strength of a Group
2735Collecting Chocolates
2749Minimum Operations to Make the Integer Zero
2761Prime Pairs With Target Sum
2768Number of Black Blocks
2800Shortest String That Contains Three Strings
2844Minimum Operations to Make a Special Number
2860Happy Students
2929Distribute Candies Among Children II
2934Minimum Operations to Maximize Last Elements in Arrays
2947Count Beautiful Substrings I
2975Maximum Square Area by Removing Fences From a Field
0681Next Closest TimePremium
1999Smallest Greater Multiple Made of Two DigitsPremium
2417Closest Fair IntegerPremium

Hard (20)

Hard problems
No.Problem
0479Largest Palindrome Product
0829Consecutive Numbers Sum
0906Super Palindromes
1601Maximum Number of Achievable Transfer Requests
1617Count Subtrees With Max Distance Between Cities
1761Minimum Degree of a Connected Trio in a Graph
2014Longest Subsequence Repeated k Times
2025Maximum Number of Ways to Partition an Array
2081Sum of k-Mirror Numbers
2122Recover the Original Array
2151Maximum Good People Based on Statements
2234Maximum Total Beauty of the Gardens
2242Maximum Score of a Node Sequence
2306Naming a Company
2440Create Components With Same Value
2468Split Message Based on Limit
2552Count Increasing Quadruplets
2763Sum of Imbalance Numbers of All Subarrays
2959Number of Possible Sets of Closing Branches
1956Minimum Time For K Virus Variants to SpreadPremium

Eyes only

When the Enumeration problem arrives live.

In the live round, Stealth Interview reads the problem off your screen, returns a working solution with a step-by-step explanation and its time and space complexity, and transcribes what the interviewer says. It's a desktop app for macOS and Windows, invisible to screen sharing.