Combinatorics coding challenges

Practise combinatorics with 6 coding challenges, from easy to hard. Every challenge runs in your browser with instant tests, an AI review of your code and community solutions to compare.

Easy · 2 Medium · 4

Skills you'll practise: 2D listsAttack patternsBinomial coefficientsBuilding from previous rowsClosed formulasCounting combinationsCounting pairsCounting placementsGrid path countingModular countingRecurrencesUnbounded knapsack
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
226
Challenges
2
Solutions shared
3
Languages

All challenges

Search by topic, language, or difficulty.

6 challenges
Medium

Count Grid Paths

Count routes across a rectangular grid using only right and down moves.

You'll learn Grid path countingBinomial coefficients
CombinatoricsDynamic-programming
No solutions yet
Medium

Count Dice Sequences

Count ordered die-roll sequences with a given total.

You'll learn RecurrencesModular counting
CombinatoricsDynamic-programming
No solutions yet
Medium

Count Coin Combinations

Count ways to make an amount with unlimited coins of specified denominations.

You'll learn Unbounded knapsackCounting combinations
CombinatoricsDynamic-programming
No solutions yet
Medium

Two Nonattacking Knights

Count safe placements of two knights for each square board size.

You'll learn Counting placementsAttack patterns
Combinatoricsmath
No solutions yet
Easy

Count Handshakes

Count handshakes when every pair of people shakes hands once.

You'll learn Counting pairsClosed formulas
Combinatoricsmath
No solutions yet
Easy

Pascal’s Triangle

Build rows by adding neighboring entries from the previous row.

You'll learn 2D listsBuilding from previous rows
ArraysCombinatorics
No solutions yet