Binary Subarray with Sum
Given a binary list and a goal sum, count the number of subarrays that add up to that goal.
Four Sum
Find all unique quadruplets in an array that sum to a given target.
Score of Parentheses
Given a balanced parentheses string, compute its score where () is 1 and concatenation sums, nesting multiplies by 2.
Sum of Subarray Minimums
Given an integer array, sum the minimum of all contiguous subarrays modulo 10^9+7.
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.
Pairwise sum of adjacent nodes
Sum each adjacent pair; keep a lone last node as-is.
Matrix Block Sum
Given a 2D matrix and a block size, compute the sum of each block centered at every cell.
Extract JSON-like numbers
Parse a simplified JSON-like string without using the json module and sum all numbers found in it.
Prefix sum vector
Return running totals for each prefix of the vector.
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
- Pick a category — basics, algorithms, strings, and more
- Open a challenge, read the statement, and edit the starter code
- 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.