Count inversions lite
Implement a function that counts inversions in a list of numbers efficiently.
Count pairs with given difference
Count how many unordered pairs in a list have a given absolute difference using an efficient approach.
Radix Sort
Implement LSD radix sort to sort a list of non-negative integers in ascending order.
Decode Ways
Count the number of ways to decode a numeric string into letters using the mapping A=1 to Z=26.
Count of Range Sum
Count contiguous subarrays whose sum lies in a given inclusive range using an efficient divide-and-conquer algorithm.
Consecutive available seats
Given a list of seat statuses, return the length of the longest consecutive run of available (0) seats.
Arithmetic Slices Count
Given a list of integers, count how many contiguous subarrays of length at least 3 form an arithmetic sequence.
Knight Tour Count
Implement a backtracking search to count all ways a knight can visit every cell on a 5x5 board exactly once starting from (0,0).
Power set size
Compute the size of the power set of a given sequence.
Count divisors
Compute the number of positive divisors of a given integer using its prime factorization.
Count Set Bits
Implement a function that returns the number of set bits (1s) in the binary representation of a non-negative integer.
Brian Kernighan count
Implement a function that counts set bits using Brian Kernighan's efficient algorithm.
Find Duplicate Bits
Given a positive integer, return the positions where the bit value appears more than once in its binary form.
Climbing Stairs
Implement a function that returns the number of distinct ways to climb n stairs using steps of 1 or 2.
Unique Paths in a Grid
Count the number of unique paths from the top-left corner to the bottom-right corner of a grid, moving only right and down.
Target Sum Subsets
Write a function that counts the number of subsets of a list of positive integers that sum exactly to a target.
Coin Change Ways
Count the number of distinct combinations of coins that sum to a target amount.
Unique Paths in a Grid
Count distinct paths in an m x n grid moving only down or right.
Count subsets with sum
Given a list of integers and a target sum, count how many subsets of the list sum to the target.
Target sum assignments
Given a list of integers and a target, count how many ways to assign + or - to each number so the total equals the target.
Tiling dominoes count
Given a 2 x n board, count the distinct tilings using 2 x 1 dominoes.
Maximum Width of a Binary Tree
Given the root of a binary tree, compute its maximum width (the maximum number of nodes in any level, counting null positions).
Android unlock patterns
Count the number of valid Android unlock patterns of a given length using a 3x3 grid with adjacency constraints.
N-Queens Count
Count the number of distinct valid placements of n non-attacking queens on an n×n chessboard.
Showing 25–48 of 59 challenges
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.