Go coding challenges

225 challenges you can solve in Go, 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
Easy

Fizz Buzz

Build a sequence using divisibility by 3 and 5.

You'll learn ConditionsDivisibility
BeginnerNumbers
No solutions yet
Easy

First Negative Index

Find where the first negative number appears.

You'll learn Linear searchEarly return
ArraysBeginnerLearning-path
Medium

Nearest Smaller Value to the Left

For each number, find the closest earlier position containing a strictly smaller number.

You'll learn Monotonic stackLinear time
ArraysStacks
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
Easy

Swap First and Last

Exchange the first and last items of a list.

You'll learn List indexingSwapping
ArraysBeginnerLearning-path
Easy

Hamming Distance

Compare two DNA strings position by position and count the differences.

You'll learn String comparisonCounting
SequencesStrings
No solutions yet
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
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

Count Positive Numbers

Count the values greater than zero in a list.

You'll learn ListsCounting
ArraysBeginnerLearning-path
Easy

Running Sum

Replace each value with the total so far.

You'll learn Prefix sumsLists
ArraysBeginnerLearning-path
Medium

Minimax Tic-Tac-Toe

Pick the perfect tic-tac-toe move by searching the whole game tree with minimax.

You'll learn MinimaxGame trees
Recursionai
No solutions yet
Easy

Gradient Descent with Momentum

Apply momentum updates, which keep part of the previous step so training speeds up along consistent directions.

You'll learn MomentumOptimizers
Neural networksaimachine learning
No solutions yet
Easy

Hours, Minutes, and Seconds

Convert a duration in seconds to a compact readable string.

You'll learn Time unitsString formatting
Beginnermath
No solutions yet
Medium

Digit Power Sum

Add each digit raised to its position from the left.

You'll learn Digit extractionPowersLoops
Algorithms
Medium

Digital Root

Sum the digits repeatedly until one digit remains.

You'll learn Nested loopsDigit sums
Algorithms
Easy

Difference of Squares

Subtract the sum of squares from the square of the sum.

You'll learn FormulasArithmetic
Beginnermath
No solutions yet
Medium

Adam Optimizer

Implement Adam, the default optimizer for deep learning, with moving averages and bias correction.

You'll learn AdamBias correction
Neural networksaimachine learning
No solutions yet
Easy

Classify a Number by Its Divisors

Classify a positive integer as perfect, abundant, or deficient.

You'll learn DivisorsClassification
BeginnerNumber-theory