LeetCodechevron_rightCategorieschevron_rightcombinatorics
label

combinatorics

49 problems
Easy: 3Medium: 14Hard: 32

combinatorics is one of the most repeated interview dimensions. Start with edge-safe fundamentals, then move into pattern-level trade-offs.

Interview Signal

Frequently tests problem modeling, edge handling, and verbal clarity.

Common Pitfall

Template-only answers break under follow-up questioning.

Practice Strategy

Practice in 3-5 problem rounds and always review complexity alternatives.

Recommended Progression

Problem bank

combinatorics problem bank

Start with a compact scan-friendly list and progressively load more so the topic page stays readable even when the corpus is large.

Progressive topic library

Built for large topic sets: scan the structure first, then go deeper.

hourglass_bottomScroll to continue
search
tuneDifficulty

Showing 24 / 49 problems

+24 per load
#TitleDifficulty
62

Unique Paths

Calculate the number of unique paths for a robot to move on an m x n grid with only right and down movements.

Medium
458

Poor Pigs

Find the minimum number of pigs required to determine the poisonous bucket within a set time using state transition dyna…

Hard
920

Number of Music Playlists

Solve the Number of Music Playlists problem with dynamic programming, focusing on state transitions and combinatorics to…

Hard
1201

Ugly Number III

Find the nth positive integer divisible by a, b, or c using binary search over the answer space efficiently and accurate…

Medium
1359

Count All Valid Pickup and Delivery Options

Count all valid pickup and delivery sequences for n orders where deliveries occur after pickups using dynamic programmin…

Hard
1467

Probability of a Two Boxes Having The Same Number of Distinct Balls

Compute the probability that two boxes contain the same number of distinct balls using careful combinatorial and DP meth…

Hard
1569

Number of Ways to Reorder Array to Get Same BST

Determine the number of ways to reorder an array to get the same binary search tree (BST) from its insertion order.

Hard
1621

Number of Sets of K Non-Overlapping Line Segments

Count all valid arrangements of k non-overlapping line segments on n points using state transition dynamic programming.

Medium
1641

Count Sorted Vowel Strings

Calculate the number of length-n strings with vowels only that are sorted lexicographically using state transitions.

Medium
1643

Kth Smallest Instructions

Find the kth smallest lexicographic instruction sequence for reaching a destination in a grid using state transition dyn…

Hard
1735

Count Ways to Make Array With Product

Determine the number of arrays of size n where the product equals k using prime factorization and combinatorial DP techn…

Hard
1830

Minimum Number of Operations to Make String Sorted

Calculate the minimum operations to sort a string using combinatorial math and string manipulation techniques efficientl…

Hard
1863

Sum of All Subset XOR Totals

Compute the sum of all subset XOR totals using a backtracking search with pruning for arrays of small size.

Easy
1866

Number of Ways to Rearrange Sticks With K Sticks Visible

Calculate the number of arrangements of n uniquely-sized sticks so exactly k sticks are visible using dynamic programmin…

Hard
1916

Count Ways to Build Rooms in an Ant Colony

Solve the problem of counting distinct ways to build rooms in an ant colony using dynamic programming and topological or…

Hard
2063

Vowels of All Substrings

Compute the total number of vowels in all substrings of a given string using efficient state transition dynamic programm…

Medium
2221

Find Triangular Sum of an Array

The problem asks for calculating the triangular sum of an array through repeated pairwise summation.

Medium
2338

Count the Number of Ideal Arrays

This problem involves counting the number of ideal arrays of a given length under certain conditions using state transit…

Hard
2400

Number of Ways to Reach a Position After Exactly k Steps

Find the number of ways to reach a position after exactly k steps on an infinite number line using dynamic programming.

Medium
2514

Count Anagrams

Learn to count distinct anagrams for a multi-word string using hash tables, math, and combinatorics efficiently.

Hard
2597

The Number of Beautiful Subsets

Count all non-empty subsets of an array where no two numbers have an absolute difference equal to k, using array scannin…

Medium
2842

Count K-Subsequences of a String With Maximum Beauty

Determine the number of k-length unique subsequences in a string that maximize the sum of character frequencies efficien…

Hard
2928

Distribute Candies Among Children I

Given two integers n and limit, find the number of ways to distribute n candies among 3 children, with no child receivin…

Easy
2929

Distribute Candies Among Children II

Determine how to distribute n candies among 3 children without exceeding a limit on individual candies.

Medium

swap_vertScroll inside the bank to auto-load more

Related Patterns

Combinatorics LeetCode Problems: 49 Solutions