Programming Challenges

Strengthen your problem-solving skills with language-neutral challenges you can solve in Python, C++, C#, Java, JavaScript, Go, Rust, Kotlin or Swift. Every submission is checked by automated tests and reviewed by AI.

  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
341
Challenges
245
Solutions shared
9
Languages

All challenges

Search by name or topic, or filter by difficulty.

341 challenges
Easy

Square a Number

Multiply an integer by itself.

You'll learn FunctionsArithmetic
Beginner
Easy

Vehicle Tolls

Charge tolls for motorbikes, cars and trucks where trucks extend the basic vehicle rule with axles.

You'll learn InheritanceMethod overriding
BeginnerSimulation
No solutions yet
Easy

Split a List Into Chunks

Cut a list into consecutive groups of a fixed size, with a shorter last group if needed.

You'll learn SlicingBatching
ArraysBeginner
No solutions yet
Easy

Factorial

Multiply all positive integers up to n.

You'll learn LoopsRunning product
Beginner
No solutions yet
Easy

Reverse a Number

Reverse the decimal digits of a positive integer.

You'll learn Digit extractionBuilding numbers
Beginner
Easy

Sum of Digits

Add up the decimal digits of a positive integer.

You'll learn Modulo and divisionWhile loops
Beginner
Easy

Triangular Number

Add the integers from 1 through n.

You'll learn LoopsArithmetic series
Beginner
No solutions yet
Easy

Smallest Digit

Find the smallest decimal digit of a positive integer.

You'll learn Digit extractionTracking a minimum
Beginner
No solutions yet
Easy

Largest Digit

Find the largest decimal digit of a positive integer.

You'll learn Digit extractionTracking a maximum
Beginner
No solutions yet
Easy

Count Digits

Count the decimal digits of a positive integer.

You'll learn Integer divisionCounting loops
Beginner
No solutions yet
Easy

Integer Square Root

Find the largest whole number whose square does not exceed n, without a square root function.

You'll learn Binary searchInteger overflow
BeginnerBinary-searchCS1High schoolLoopsNumbersmath
No solutions yet
Medium

Decode the Pattern

Work out the rule behind a family of letter squares from its first members, then build the member for any n.

You'll learn Pattern analysisGrid coordinates
CS1High schoolIntermediateLoopsNested-loopsPatterns
No solutions yet
Medium

Step Tracker Class

Simulate a step tracker object: record daily steps and answer total, active day, average and best day queries.

You'll learn Object stateRunning statistics
AP Computer ScienceCS1ClassesHomeworkIntermediateIntro programmingOOPStudent-beginner
No solutions yet
Medium

Reverse the Bits

Reverse the order of the lowest width bits of a number.

You'll learn Bit shiftsBit masks
Bit manipulationCS1High schoolIntermediateLoopsNumbersmath
No solutions yet
Easy

Binary Triangle

Print a right triangle of alternating 1s and 0s where each row starts with the opposite digit of the row above.

You'll learn Nested loopsParity
BeginnerBit manipulationCS1High schoolLoopsNested-loopsPatterns
No solutions yet
Easy

Binomial Coefficient

Count the ways to choose k items out of n (n choose k).

You'll learn Pascal's triangleOverflow-safe arithmetic
BeginnerCS1High schoolLoopsNumbersmath
No solutions yet
Medium

Number to Words

Spell a whole number in English words, such as "one hundred twenty-three".

You'll learn Lookup tablesDecomposing numbers
CS1High schoolIntermediateLoopsNumbersmath
No solutions yet
Medium

Diamond Pattern

Print a solid diamond of stars made of a pyramid and its mirror image.

You'll learn Nested loopsSymmetry
CS1High schoolIntermediateLoopsNested-loopsPatterns
No solutions yet