C++ coding challenges

226 challenges you can solve in C++, 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 · 68 Hard · 24

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

All challenges

Search by topic, language, or difficulty.

226 challenges
Easy

Word Tile Score

Add the tile values for every letter in a word.

You'll learn Letter scoresSumming with a map
Lookup-tablesStrings
No solutions yet
Easy

First Negative Index

Find where the first negative number appears.

You'll learn Linear searchEarly return
ArraysBeginnerLearning-path
No solutions yet
Easy

Array Minimum

Find the smallest value in a list.

You'll learn Tracking a minimumSingle pass
ArraysBeginnerStudent-beginner
No solutions yet
Easy

Count Vowels

Count the vowels in a piece of text.

You'll learn Character checksSet membership
BeginnerStringsStudent-beginner
No solutions yet
Easy

Second Largest Value

Find the second largest distinct value.

You'll learn Two trackersDistinct values
ArraysBeginnerStudent-beginner
No solutions yet
Easy

Sum an Array

Add up all values in a list.

You'll learn AccumulatorsEmpty-list cases
ArraysBeginnerStudent-beginner
No solutions yet
Easy

Replace Spaces With Dashes

Turn spaces into dashes to make a URL-style slug.

You'll learn String buildingCharacter replacement
BeginnerLearning-pathStrings
No solutions yet
Easy

Point Quadrant

Find which quadrant a point lies in.

You'll learn CoordinatesSign checks
BeginnerConditionsLearning-path
No solutions yet
Easy

Sum of Multiples

Add values below a limit divisible by any supplied factor.

You'll learn LoopsDivisibility
BeginnerNumbers
No solutions yet
Easy

Above-Average Values

Keep the values that are greater than the average.

You'll learn Two passesFiltering
ArraysBeginnerLearning-path
No solutions yet
Easy

Longest Word

Find the longest word in a sentence.

You'll learn String splittingTracking a maximum
BeginnerStringsStudent-beginner
No solutions yet
Easy

Ticket Price by Age

Choose a cinema ticket price from the visitor's age.

You'll learn Age rangesBoundary values
BeginnerConditionsLearning-path
No solutions yet
Easy

Initials From a Name

Build uppercase initials from a full name.

You'll learn String splittingUppercase
BeginnerLearning-pathStrings
No solutions yet
Easy

Array Average

Compute the average of a list of numbers.

You'll learn Sum and countFloat division
ArraysBeginnerStudent-beginner
No solutions yet
Easy

Odd, Even, or Neither

Classify a number by whether it is an odd integer, an even integer, or neither.

You'll learn ModuloConditions
BeginnerNumbers
No solutions yet
Easy

Count Uppercase Letters

Count the capital letters in a text.

You'll learn Character checksCounting
BeginnerLearning-pathStrings
No solutions yet
Medium

Mini-Batch Gradient Descent

Train a linear model by updating the weights after every small batch of samples instead of the whole dataset.

You'll learn Mini-batchesGradient descent
Neural networksaimachine learning
No solutions yet
Easy

Fizz Buzz

Build a sequence using divisibility by 3 and 5.

You'll learn ConditionsDivisibility
BeginnerNumbers
No solutions yet