Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

925 challenges 556 easy 323 medium 46 hard
Bit Manipulation easy

Single Number XOR

Given a non-empty list of integers where every element appears twice except one, return the single number using XOR.

xor bit-manipulation arrays
+10 pts 12m
Bit Manipulation easy

Missing Number XOR

Given a list of n distinct numbers from 0 to n with one missing, use XOR to find and return the missing number.

xor bitwise arrays
+10 pts 15m
Dynamic Programming easy

House Robber

Given a list of house values, return the maximum sum you can rob without robbing two adjacent houses.

dynamic-programming arrays optimization
+10 pts 15m
Dynamic Programming easy

Triangle Minimum Path

Compute the minimum path sum from top to bottom of a triangle given as a list of lists.

dynamic-programming bottom-up arrays
+12 pts 20m
Dynamic Programming easy

Shortest Unsorted Continuous Subarray

Given an array of integers, return the length of the shortest contiguous subarray whose sorting makes the whole array sorted.

arrays sorting two-pointers
+10 pts 15m
Binary Search easy

Search Insert Position

Return the index where a target should be inserted into a sorted list to maintain order.

binary-search arrays searching
+10 pts 15m
Binary Search easy

Lower Bound Binary Search

Implement binary search to find the first index where an element is not less than a given target.

binary-search search arrays
+8 pts 12m
Binary Search easy

Upper Bound Binary Search

Write a function that returns the index of the first element greater than a target in a sorted list.

binary-search arrays searching
+8 pts 12m
Two Pointers & Sliding Window easy

Best Time to Buy and Sell Stock

Given a list of daily stock prices, determine the maximum profit achievable by buying on one day and selling on a later day.

arrays sliding-window profit
+10 pts 15m
Two Pointers & Sliding Window easy

Reduce array to zero

Given an array of non-negative integers, each operation chooses two indices and subtracts 1 from each if both are positive. Return the minimum number of operations to reduce the array to all zeros, or -1 if impossible.

two-pointers arrays greedy
+10 pts 15m
Stacks & Queues easy

Next Greater Element

Return a list where each position holds the next greater element to the right, or -1 if none exists.

stack arrays monotonic stack
+10 pts 15m
Numpy & Vectorized Computing easy

Element-wise vector addition

Add equal-length numeric lists element-wise.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Scale a vector by scalar

Multiply every element by k.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Dot product of two vectors

Return sum of element-wise products.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Mean of a vector

Return arithmetic mean or 0.0 when empty.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Maximum element in vector

Return largest value or None when empty.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Minimum element in vector

Return smallest value or None when empty.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Clip vector to range

Clamp each value to [lo, hi].

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Min-max normalize vector

Scale values to 0..1; equal values become all 0.0.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Sum each matrix row

Given rows, return each row sum.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Sum each matrix column

Return column totals for a rectangular matrix.

vectors arrays numpy-style
+10 pts 12m

Showing 25–45 of 45 challenges · easy

Guide: free Python coding challenges

Practice Python by solving problems

PythonSkillset challenges are hands-on coding exercises from beginner to advanced. Open a challenge, read the problem, write Python in the split-pane editor, and run tests with Pyodide — no install required.

How to use the arena

  1. Pick a category — basics, algorithms, strings, and more
  2. Open a challenge, read the statement, and edit the starter code
  3. Run tests, fix failures, then try a related quiz or tutorial lesson

Challenges vs tutorials and quizzes

Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.