Pattern · Combinatorics

Combinatorics interview questions

24 combinatorics problems tagged across recent interview reports. Drilled most heavily by rubrik, amazon, and bloomberg.

Founder's read

Combinatorics problems ask you to count valid arrangements, distributions, or selections without enumerating them all. With 24 problems across this pattern, it's a staple in live assessments at Rubrik, Amazon, Bloomberg, and others. You'll face variants on permutations, combinations, and constrained counting within tight time limits. When a combinatorics problem lands in your OA and the math doesn't click, StealthCoder solves it in seconds, invisible to the proctor.

Most-asked combinatorics problems

The hedge for the live OA

You can't drill every combinatorics 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 Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.

Get StealthCoder
What this means

Combinatorics hides in deceptively simple language: 'count the ways', 'distribute', 'arrange', 'select'. The pattern splits into classical counting (permutations, combinations, multinomial coefficients) and constraint-based counting (sequences with forbidden patterns, monotonic pairs, infection spreads). You'll recognize it by the absence of a single 'optimal' object to find and the presence of 'how many'. Rubrik loads especially hard on distribution and arrangement variants. Master the basics first, anagrams and simple distributions, then move to constrained counts and derangements. When you hit a novel twist during the live assessment, StealthCoder is your hedge.

Companies that hire most on combinatorics

The honest play

24 combinatorics problems. You won't drill them all. Pass anyway.

Combinatorics 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 combinatorics flavor lands in your live OA. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Combinatorics interview FAQ

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

The pattern spans 24 problems across difficulty levels. Spend 2-3 hours on classical foundations (permutations, combinations, multinomial), then drill 8-10 constraint-based variants like derangements and infection sequences. Rubrik specifically weights distribution and pickup-delivery patterns.

Is combinatorics the most important pattern for Amazon or Microsoft?+

No. It's present in their OAs (Amazon 6 problems, Microsoft 4), but usually mixed with dynamic programming and greedy. Treat it as a necessary secondary skill, not the focus. Rubrik (8 problems) weighs it more heavily.

How do I recognize a combinatorics problem in 30 seconds?+

Look for 'count', 'how many', 'ways to', or 'distribute'. If the problem asks for a number of valid configurations rather than one best solution, it's combinatorics. Cross-check: does it need math (formulas) or brute search (backtracking).

Which companies test combinatorics the hardest?+

Rubrik leads with 8 problems, then Amazon (6). Bloomberg, DE Shaw, Grammarly, Infosys, and Microsoft each weigh it at 4. If you're interviewing with Rubrik, prioritize distribution and derangement variants.

Should I code a formula or iterate through all cases?+

Always derive the formula when possible, it's faster and cleaner. Iteration works for small constraints but fails at scale. Problems like 'distribute-candies-among-children' reward closed-form thinking. If you can't derive it live, StealthCoder has the formula ready.

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