Basic Calculator III
Implement a recursive descent parser to evaluate a fully parenthesized arithmetic expression with +, -, *, / and parentheses.
Sliding window maximum
Return the maximum of each window of size k as it slides across an array.
Curry a function
Auto-curry any multi-argument function so it returns partial applications until fully saturated.
LRU cache decorator
Implement @lru_cache(maxsize=N) for unary functions using OrderedDict.
Longest increasing subsequence
Return the length of the longest strictly increasing subsequence.
Topological sort (Kahn)
Return a valid topological ordering of tasks, or [] if a cycle exists.
Word ladder length
Return the length of the shortest transformation from beginWord to endWord changing one letter at a time.
Median of Two Sorted Arrays
Given two sorted arrays, return the median of the combined sorted array in O(log(min(n,m))) time.
Count of Range Sum
Count contiguous subarrays whose sum lies in a given inclusive range using an efficient divide-and-conquer algorithm.
Largest Rectangle in Histogram
Given an array of bar heights, compute the largest rectangle that can be formed by consecutive bars.
N-Queens Solutions
Implement a function to count the number of distinct ways to place n queens on an n×n board.
Merge K Sorted Lists
Write a function that merges multiple sorted lists into a single sorted list.
Largest Area Histogram Matrix
Given a binary matrix, compute the largest rectangle area consisting entirely of 1s.
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).
Data pipeline
Implement a Pipeline class supporting pipe chaining with the | operator.
Validated descriptor
Implement a TypedField descriptor that raises TypeError if the value is not of the expected type.
Match IPv6 Address
Write a function that uses a regex to validate whether a string is a fully expanded IPv6 address.
Palindrome Partitioning Minimum Cuts
Given a string, return the minimum number of cuts needed such that every substring in the partition is a palindrome.
Egg Drop Puzzle
Given k eggs and n floors, compute the minimum number of attempts required in the worst case to find the highest safe floor.
Create Maximum Number
Given two arrays of digits and an integer k, merge them to form the largest number of length k.
Cherry Pickup Maximum
Given a grid with cherries, find the maximum cherries you can collect using two paths from top-left to bottom-right.
Split Array Largest Sum
Minimize the largest sum among k contiguous subarrays using dynamic programming.
Dijkstra Shortest Path
Implement Dijkstra's algorithm on a weighted graph to return distances from a source to every node.
Minimum Cut
Given an undirected graph in adjacency-list form, return the size of the minimum edge cut that disconnects the graph.
Showing 1–24 of 46 challenges · hard
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.