Programming Challenges

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

  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
226
Challenges
123
Solutions shared
3
Languages

All challenges

Search by topic, language, or difficulty.

226 challenges
Medium

Perceptron Learning Algorithm

Train the original perceptron, which updates its weights only when it makes a mistake.

You'll learn PerceptronOnline learning
Neural networksaimachine learning
No solutions yet
Medium

Q-Learning Updates

Apply the Q-learning update to a stream of experiences and watch rewards flow back to earlier states.

You'll learn Q-learningDiscounted rewards
Reinforcement learningaimachine learning
No solutions yet
Easy

Loss Functions: MSE, MAE and Cross-Entropy

Measure how wrong a model's predictions are with mean squared error, mean absolute error or binary cross-entropy.

You'll learn MSECross-entropy
Neural networksaimachine learning
No solutions yet
Medium

Forward Propagation in a Two-Layer Network

Run inputs through a hidden ReLU layer and a sigmoid output layer.

You'll learn Forward passMulti-layer networks
Neural networksaimachine learning
No solutions yet
Easy

Pangram Check

A pangram contains every English letter at least once.

You'll learn Letter setsCase normalization
SetsStrings
No solutions yet
Easy

Rotate Array

Rotate a list to the right by some steps.

You'll learn Array indexingModulo
ArraysBeginnerStudent-beginner
No solutions yet
Medium

Robot Command Simulator

Move a robot using L (turn left 90 degrees), R (turn right 90 degrees), and A (advance one step).

You'll learn Direction vectorsCommand processing
SimulationState-machines
No solutions yet
Easy

Single Artificial Neuron

Compute the output of one neuron: weighted sum of the inputs plus a bias, passed through sigmoid.

You'll learn NeuronsWeighted sums
Neural networksaimachine learning
No solutions yet
Easy

Title Case

Capitalize the first letter of every word.

You'll learn String methodsCapitalization
BeginnerStringsStudent-beginner
No solutions yet
Easy

Leap Year

Check whether a year follows the Gregorian leap-year rule.

You'll learn Boolean logicConditions
BeginnerNumbers
Easy

Count Words

Count the words in a sentence.

You'll learn String splittingWhitespace
BeginnerStringsStudent-beginner
No solutions yet
Easy

Reverse a String

Return the characters of a string in reverse order.

You'll learn Reverse iterationSlicing
BeginnerStringsStudent-beginner
Medium

Dense Layer Forward Pass

Compute the outputs of a fully connected layer of neurons with a choice of activation.

You'll learn Dense layersActivations
Neural networksaimachine learning
No solutions yet
Medium

Longest Common Subsequence Length

A subsequence is formed by deleting zero or more elements while preserving the order of the remaining elements.

You'll learn 2D DP tablesMemory optimization
Dynamic-programmingSequences
No solutions yet
Easy

Median of a List

Find the middle value of a list after sorting.

You'll learn SortingStatistics
Arraysmath
No solutions yet
Easy

Move Zeroes

Move every zero to the end while keeping the other order.

You'll learn Two pointersIn-place updates
ArraysBeginnerStudent-beginner
No solutions yet
Easy

Anagram Check

Check whether two phrases use the same letters.

You'll learn SortingFrequency counts
BeginnerStringsStudent-beginner
Easy

Count Uppercase Letters

Count the capital letters in a text.

You'll learn Character checksCounting
BeginnerLearning-pathStrings