Go coding challenges

340 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 · 193 Medium · 118 Hard · 29

Skills you'll practise: Nested loopsDigit extractionCountingLoopsString splittingConditionsSieve of Eratosthenes2D listsArithmeticBig number arithmeticCycle detectionDivisibility
  • 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.

340 challenges
Easy

First Fibonacci With N Digits

Find the position of the first Fibonacci number that has n digits.

You'll learn Big number arithmeticSequences
BeginnerBig integersCompetitive-programmingNumber-theoryProject Euler stylemath
No solutions yet
Easy

Distinct Powers

Count the different values of a to the power b for a and b in a range.

You'll learn Perfect powersSets
BeginnerCompetitive-programmingNumber-theoryProject Euler stylemath
No solutions yet
Easy

Factorial Digit Sum

Add up the decimal digits of n factorial.

You'll learn Big number arithmeticDigit manipulation
BeginnerBig integersCompetitive-programmingNumber-theoryProject Euler stylemath
No solutions yet
Medium

Longest Collatz Chain

Find the starting number up to a limit whose Collatz chain is longest.

You'll learn MemoizationSimulation
Competitive-programmingIntermediateNumber-theoryProject Euler stylemath
No solutions yet
Easy

Coin Toss Streaks

Find the longest streak of heads, the longest streak of tails and the number of streaks in a coin toss record.

You'll learn Run detectionCounting
BeginnerCS1DiceHomeworkIntro programmingProbabilityStudent-beginner
No solutions yet
Easy

Word Scramble

Scramble words by swapping each vowel with the consonant right after it, scanning left to right.

You'll learn Character scanningSwapping
AP Computer ScienceBeginnerCS1ClassesGamesHomeworkIntro programmingOOPStudent-beginner
No solutions yet
Easy

Centered Star Pyramid

Print a centered pyramid of stars with an odd number of stars on each row.

You'll learn Nested loopsPadding
BeginnerCS1High schoolLoopsNested-loopsPatterns
No solutions yet
Medium

Integer to Roman

Write a whole number from 1 to 3999 as a Roman numeral.

You'll learn Greedy algorithmsLookup tables
CS1High schoolIntermediateLoopsNumbersmath
No solutions yet
Easy

Vowel Counter by Position

List the positions of every a, e, i, o and u in a piece of text.

You'll learn String indexingCase-insensitive comparison
BeginnerCS1HomeworkIntro programmingStudent-beginner
No solutions yet
Medium

Circular Primes

Count the primes up to a limit whose every digit rotation is also prime.

You'll learn Primality testingDigit rotation
Competitive-programmingIntermediateNumber-theoryPrimesProject Euler stylemath
No solutions yet
Medium

Grayscale Filter

Turn a grid of packed RGB pixels into grayscale using weighted channel brightness.

You'll learn Bit shiftingInteger rounding
Bit manipulationCS1CS50 styleGridsHomeworkImage processingIntermediateIntro programmingMatricesStudent-beginner
No solutions yet
Medium

Zigzag Wave Pattern

Draw a zigzag line of stars that bounces between the top and bottom rows of a grid.

You'll learn GridsModular arithmetic
CS1High schoolIntermediateLoopsNested-loopsPatterns
No solutions yet
Medium

Name Scores

Sort a list of names and add up each name's letter value times its position.

You'll learn Sorting stringsCharacter codes
Competitive-programmingIntermediateNumber-theoryProject Euler stylemath
No solutions yet
Medium

Nth Prime

Return the nth prime number, counting 2 as the first.

You'll learn Prime testingSieve of Eratosthenes
CS1High schoolIntermediateLoopsNumber-theoryNumbersPrimesmath
No solutions yet
Easy

Twin Primes

List all twin prime pairs (p, p + 2) up to a limit.

You'll learn Sieve of EratosthenesPairing neighbours
BeginnerCS1High schoolLoopsNumber-theoryNumbersPrimesmath
No solutions yet
Easy

Smallest of Three

Return the smallest of three integers.

You'll learn ComparisonsVariables
BeginnerCS1ConditionsFunctionsHomeworkIntro programmingStudent-beginner
No solutions yet
Hard

Digit Factorial Chains

Count starting numbers whose digit factorial chain has exactly a given number of distinct terms.

You'll learn Cycle detectionMemoization
AdvancedCompetitive-programmingNumber-theoryProject Euler stylemath
No solutions yet
Easy

Double-Base Palindromes

Add up the numbers that read the same both ways in base 10 and in a second base.

You'll learn Base conversionPalindromes
BeginnerCompetitive-programmingNumber-theoryPalindromesProject Euler stylemath
No solutions yet