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
Two Pointers & Sliding Window medium

Binary Subarray with Sum

Given a binary list and a goal sum, count the number of subarrays that add up to that goal.

sliding-window two-pointers subarray
+20 pts 20m
Two Pointers & Sliding Window medium

Four Sum

Find all unique quadruplets in an array that sum to a given target.

two-pointers sorting set
+30 pts 25m
Stacks & Queues medium

Score of Parentheses

Given a balanced parentheses string, compute its score where () is 1 and concatenation sums, nesting multiplies by 2.

stack string parsing
+20 pts 20m
Stacks & Queues medium

Sum of Subarray Minimums

Given an integer array, sum the minimum of all contiguous subarrays modulo 10^9+7.

stack array monotonic-stack
+30 pts 30m
Heaps & Priority Queues medium

Find K pairs with smallest sums

Given two sorted arrays and an integer k, return the k smallest pairs (u, v) with the smallest sums, sorted by sum.

heap priority queue two-sum
+25 pts 30m
Linked Lists medium

Pairwise sum of adjacent nodes

Sum each adjacent pair; keep a lone last node as-is.

linked-list lists pointers
+22 pts 20m
Matrix & 2D Arrays medium

Matrix Block Sum

Given a 2D matrix and a block size, compute the sum of each block centered at every cell.

matrix prefix-sum 2d-array
+25 pts 25m
Data Formats & Parsing medium

Extract JSON-like numbers

Parse a simplified JSON-like string without using the json module and sum all numbers found in it.

json parsing numbers
+14 pts 20m
Numpy & Vectorized Computing medium

Prefix sum vector

Return running totals for each prefix of the vector.

vectors arrays numpy-style
+22 pts 20m

Showing 25–33 of 33 challenges · medium

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.