- Executors
-
Learn
Learn Python Runnable examples, NumPy, pandas, and more Learn AI / Machine LearningNeural networks, ML and LLMs from scratch Learn C & C++ Pointers, memory, STL, and modern C++ Learn C#C# basics, OOP, LINQ, async, and .NET exercises Learn MatplotlibLine, bar, scatter and pie charts with live visualizers Learn RustOwnership, traits, error handling, and threads Learn GoSlices, interfaces, goroutines, and channels Python Algorithms Search, sorting, recursion, and visualizers O(n) C & C++ Algorithms Compare algorithms implemented in C and C++ Coding for Kids Learn to code by playing!
- QuizzesNew
- ChallengesNew
- For TeachersNew
- Updates
- Buy me a coffee
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.
Easy
Xavier and He Weight Initialization
Compute the range or standard deviation used to initialize the weights of a layer.
You'll learn
Xavier and He initTraining stability
No solutions yet
Easy
Classify a Number by Its Divisors
Classify a positive integer as perfect, abundant, or deficient.
You'll learn
DivisorsClassification
Easy
Chess Square Color
Determine the color of a square on an 8 by 8 board.
You'll learn
CoordinatesParity
No solutions yet
Hard
Train a Neural Network to Solve XOR
Combine everything: train a 2-2-1 sigmoid network with backpropagation until it learns XOR.
You'll learn
Neural network trainingXOR problem
Easy
To-Do List
Keep a list of tasks: add them, mark them done, remove them and report what is still pending.
You'll learn
Typed collectionsRecords
Hard
Scaled Dot-Product Attention
Implement the attention operation at the heart of Transformers and large language models.
You'll learn
AttentionTransformers
Medium
Weekly Payroll
Total a week's pay for salaried, hourly and commission employees, each paid by its own rule.
You'll learn
PolymorphismOvertime math
No solutions yet
Medium
Composite Folder Sizes
Compute the total size of every folder in a tree where folders contain files and other folders.
You'll learn
Composite patternTrees
No solutions yet
Easy
Sum the Valid Numbers
Add up the entries that are whole numbers and skip everything else, the way try/except handles bad input.
You'll learn
Try/exceptInput validation
Medium
Train a Neuron with Gradient Descent
Repeat forward pass, gradients and weight updates to teach a sigmoid neuron from examples.
You'll learn
Gradient descentTraining loops
No solutions yet
Easy
First Invalid Age
Validate typed ages and report where the first bad entry is instead of letting the program crash.
You'll learn
ValidationParsing
No solutions yet
Easy
Softmax Function
Turn raw scores into probabilities that add up to 1, without overflowing on large values.
You'll learn
SoftmaxNumerical stability
No solutions yet
Medium
SQL Query Builder
Assemble a SQL query from parts given in any order, the way a builder object collects settings step by step.
You'll learn
Builder patternString assembly
No solutions yet
Hard
Multi-Head Self-Attention
Project the input into queries, keys and values, run attention in several heads in parallel, and combine them.
You'll learn
Multi-head attentionMatrix projections
Easy
Growing a Dynamic Array
Simulate how a dynamic array doubles its capacity and count the reallocations and copied elements.
You'll learn
Dynamic arraysAmortised cost
No solutions yet
Easy
Count Log Levels
Read the lines of a log file and count how many are INFO, WARNING and ERROR.
You'll learn
Reading linesString splitting
No solutions yet
Easy
Sum a Flat JSON Object
Parse a flat JSON object whose values are integers and add up the values.
You'll learn
JSON parsingString splitting
No solutions yet
Medium
Causal (Masked) Self-Attention
Implement the masked attention GPT models use, where each token can only look at itself and earlier tokens.
You'll learn
Masked attentionGPT models
No solutions yet
Browse by topic
- Beginner 154
- CS1 90
- Math 76
- Loops 58
- Intermediate 51
- High School 50
- Ai 47
- Numbers 46
- Machine Learning 42
- Number Theory 41
- Homework 40
- Intro Programming 40
- Strings 36
- Competitive Programming 35
- Arrays 31
- Conditions 25
- Nested Loops 25
- Project Euler Style 25
- Patterns 24
- Functions 21
- Advanced 20
- Simulation 19
- Dynamic Programming 18
- Neural Networks 17
- Grids 16
- Primes 14
- Parsing 13
- CS50 Style 10
- Sorting 9
- AP Computer Science 8
- Classes 8
- Design Patterns 8
- Graphs 8
- Matrices 8
- OOP 8
- Recursion 8
- Combinatorics 6
- Stacks 6
- Big Integers 5
- Bit Manipulation 5
- Finance 5
- Greedy 5
- Sequences 5
- Variables 5
- Algorithms 4
- Data Structures 4
- Dictionaries 4
- Geometry 4
- Image Processing 4
- Trees 4
- Binary Search 3
- Fractions 3
- Games 3
- Reinforcement Learning 3
- Shortest Path 3
- Sliding Window 3
- Voting 3