Pattern · Enumeration

Enumeration interview questions

46 enumeration problems tagged across recent interview reports. Drilled most heavily by rubrik, capital one, and visa.

Founder's read

Enumeration is the systematic generation and checking of all candidate solutions within a search space. You're iterating through possibilities, testing each against constraints, and collecting valid answers. With 46 problems in this pattern, it's a foundational skill that shows up most heavily at Rubrik, Capital One, and Visa. It's not glamorous, but it's often the first working solution before optimization. If you can't recognize when to enumerate and when to stop, you'll either time out or miss easy points in a live OA. StealthCoder is the safety net when a variant lands that you didn't drill.

Most-asked enumeration problems

#ProblemDiff# Companies
01Count PrimesMEDIUM10
02Number of Black BlocksMEDIUM6
03Split Message Based on LimitHARD6
04Longest Mountain in ArrayMEDIUM4
05Distribute Candies Among Children IIMEDIUM3
06Apply Operations to Make Sum of Array Greater Than or Equal to kMEDIUM2
07Coordinate With Maximum Network QualityMEDIUM2
08Count Good TripletsEASY2
09Maximum Difference Between Even and Odd Frequency IIHARD2
10Minimize Result by Adding Parentheses to ExpressionMEDIUM2
11Number of Possible Sets of Closing BranchesHARD2
12Collecting ChocolatesMEDIUM1
13Consecutive Numbers SumHARD1
14Count Almost Equal Pairs IMEDIUM1
15Count Increasing QuadrupletsHARD1
16Count Lattice Points Inside a CircleMEDIUM1
17Count Number of Maximum Bitwise-OR SubsetsMEDIUM1
18Count Square Sum TriplesEASY1
19Create Components With Same ValueHARD1
20Detect Pattern of Length M Repeated K or More TimesEASY1
21Distribute Candies Among Children IEASY1
22Divide an Array Into Subarrays With Minimum Cost IEASY1
23Find the Integer Added to Array IIMEDIUM1
24Form Smallest Number From Two Digit ArraysEASY1
25Frequencies of Shortest SupersequencesHARD1
26Identify the Largest Outlier in an ArrayMEDIUM1
27Largest Time for Given DigitsMEDIUM1
28Lexicographically Smallest String After Applying OperationsMEDIUM1
29Maximize Subarrays After Removing One Conflicting PairHARD1
30Maximum Area Rectangle With Point Constraints IMEDIUM1
31Maximum Frequency After Subarray OperationMEDIUM1
32Maximum Good People Based on StatementsHARD1
33Maximum Points in an Archery CompetitionMEDIUM1
34Maximum Square Area by Removing Fences From a FieldMEDIUM1
35Maximum Total Beauty of the GardensHARD1
36Minimum Cost to Set Cooking TimeMEDIUM1
37Minimum Moves to Capture The QueenMEDIUM1
38Next Greater Numerically Balanced NumberMEDIUM1
39Number of Unique XOR Triplets IIMEDIUM1
40Number of Ways to Buy Pens and PencilsMEDIUM1
41Removing Minimum Number of Magic BeansMEDIUM1
42Shortest String That Contains Three StringsMEDIUM1
43Smallest Greater Multiple Made of Two DigitsMEDIUM1
44Smallest Substring With Identical Characters IHARD1
45Sum of All Subset XOR TotalsEASY1
46Sum of k-Mirror NumbersHARD1
The hedge for the live OA

You can't drill every enumeration variant before the assessment. StealthCoder runs invisibly during screen share and solves whichever variant they throw at you. No browser extension. No detection signature. Built by an engineer at a top-10 tech company who can solve these problems cold but didn't want to trust himself in a 90-minute screen share.

Get StealthCoder
What this means

Enumeration problems ask you to find, count, or generate all solutions matching specific criteria. The pattern is recognizable by phrases like 'find all', 'count valid', or 'list combinations where'. Common subtypes: nested loops over indices (pairs, triplets, quadruplets), Cartesian products, constraint-based filtering, and subset generation. Drill order matters: start with straightforward nested loops like counting triplets or quadruplets, move to problems with geometric or mathematical constraints (lattice points, prime counts), then tackle optimization tricks like early termination or pruning. Problems like count-good-triplets and count-increasing-quadruplets build the foundation. When a harder variant hits your screen in a live assessment, StealthCoder reads the problem and delivers a solution in seconds, invisible to the proctor.

Companies that hire most on enumeration

The honest play

46 enumeration problems. You won't drill them all. Pass anyway.

Enumeration is one of the patterns interviews actually filter on. Memorizing every variant in a week is a fantasy. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds, no matter which enumeration flavor lands in your live OA. Built by an engineer at a top-10 tech company who can solve these problems cold but didn't want to trust himself in a 90-minute screen share. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Enumeration interview FAQ

How many enumeration problems should I drill before an OA?+

At least 8 to 10 across varying difficulty. Start with triplet/quadruplet patterns, then add constraint-based ones like coordinate-with-maximum-network-quality. The 46 problems in this pattern span wide ground; focus on the subtypes that match your target companies' recent problems.

Is enumeration just brute force?+

Not quite. Enumeration is the controlled generation of candidates. Brute force is one flavor. Real enumeration often includes pruning, early termination, or mathematical shortcuts to avoid exploring the entire space. Problems like consecutive-numbers-sum show how to enumerate smartly.

Which companies ask enumeration the most?+

Rubrik leads with 6 problems, followed by Capital One and Visa at 5 each. De Shaw, Atlassian, Databricks, and Sprinklr each have 4. If you're interviewing there, enumeration is not optional.

How do I recognize an enumeration problem in 10 seconds?+

Look for 'find all', 'count valid', 'list all pairs/triplets', or 'generate all subsets'. If the problem is asking you to iterate through a solution space and test conditions, you're enumerating. Problems like count-almost-equal-pairs-i and collect-chocolates fit this pattern.

Should I optimize enumeration or just write the nested loops?+

Write the nested loops first to pass examples. Then optimize only if time limit fails. Many enumeration problems are solvable within limits with clean O(n^2) or O(n^3) code. Premature optimization wastes interview time.

Problem and frequency data sourced from public community-maintained interview-report repos. Problems and trademarks © LeetCode.