Kotlin coding challenges

225 challenges you can solve in Kotlin, from first loops to graphs, dynamic programming and machine learning. Write your code in the browser, run the tests instantly and get an AI review.

Easy · 134 Medium · 67 Hard · 24

Skills you'll practise: CountingDigit extractionString splitting2D listsArithmeticFormulasListsLoopsConditionsDivisibilityFloating pointGradient descent
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
226
Challenges
123
Solutions shared
9
Languages

All challenges

Search by topic, language, or difficulty.

225 challenges
Medium

Raise a Fraction to a Real Power

Raise a positive fraction to a real-valued exponent.

You'll learn Real exponentsFloating point
Fractionsmath
No solutions yet
Easy

Row Sums

Add up every row of a grid.

You'll learn 2D listsNested loops
BeginnerGridsLearning-path
Easy

Greatest Common Divisor

Find the largest number that divides both values.

You'll learn Euclid's algorithmModulo
BeginnerNumbersStudent-beginner
No solutions yet
Medium

Raise a Number to a Fractional Power

Raise a positive real number to a rational exponent.

You'll learn Roots and powersFloating point
Fractionsmath
No solutions yet
Medium

Largest Adjacent-Digit Product

Take every contiguous window of span digits and multiply its digits.

You'll learn Fixed-size windowsDigit strings
NumbersSliding-window
No solutions yet
Easy

Sum of Odd Numbers

Add every odd number up to a limit.

You'll learn For loopsAccumulators
BeginnerLearning-pathLoops
Medium

Empty Two Coin Piles

Decide whether paired removals can empty two piles.

You'll learn Math reasoningInvariants
Greedymath
No solutions yet
Medium

One Generation of a Genetic Algorithm

Breed the next generation of bit strings with tournament selection, single-point crossover and mutation.

You'll learn Genetic algorithmsEvolutionary search
OptimizationSimulationai
No solutions yet
Easy

Power by Repeated Multiplication

Raise a number to a power with a loop.

You'll learn Running productZero exponent
BeginnerLearning-pathLoops
Medium

Exact Fraction Arithmetic

Perform fraction operations and return a reduced fraction.

You'll learn GCD reductionSign normalization
Fractionsmath
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

Count Dice Sequences

Count ordered die-roll sequences with a given total.

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

Countdown to Liftoff

Count down from a number and end with Liftoff!

You'll learn Reverse loopsLists
BeginnerLearning-pathLoops
Easy

Triangle Classification

Classify three side lengths as invalid, equilateral, isosceles, or scalene.

You'll learn Triangle inequalityOrdering conditions
ConditionsGeometry
No solutions yet
Easy

Multiplication Table Row

List the first multiples of a number.

You'll learn MultiplesBuilding lists
BeginnerLearning-pathLoops
Medium

Can We Split Into Two Teams?

Decide whether people can be assigned to two teams so that each listed pair is on opposite teams.

You'll learn Graph coloringBFS
BipartiteGraphs
No solutions yet
Easy

Largest of Three

Pick the largest of three numbers without a built-in max.

You'll learn ComparisonsCombining conditions
BeginnerConditionsLearning-path
Medium

Minesweeper Neighbor Counts

Annotate a rectangular board.

You'll learn 8-neighbor checksBoundary handling
ArraysGrids
No solutions yet