Coin change (DP)
Find the minimum number of coins to make exactly the target amount.
Median of Two Sorted Arrays
Given two sorted arrays, return the median of the combined sorted array in O(log(min(n,m))) time.
Decode Ways
Count the number of ways to decode a numeric string into letters using the mapping A=1 to Z=26.
Redundant Connection
Given a list of edges forming a tree plus one extra edge, return the edge that appears last in the input and creates a cycle.
Timing Decorator
Implement a decorator that prints the execution time of a function.
Context Manager Class
Implement a context manager class that measures execution time and sets duration, with None if an exception occurred.
Profile time decorator
Create a decorator that tracks how many times a function is called and its cumulative execution time.
Timer Context Manager
Implement a context manager that measures execution time of a with block and stores it.
Context Decorator Dual
Implement a timing decorator and a context manager that both record elapsed time in seconds.
Benchmark decorator
Implement a benchmarking decorator that records call count and timing statistics per function.
Validate phone number
Write a function that uses regular expressions to determine if a given string is a valid US phone number.
Match Balanced Parentheses with Regex
Write a function that uses regular expressions to determine if parentheses are balanced and properly nested.
Catalan number
Implement a function that returns the nth Catalan number using dynamic programming.
Stirling number
Implement a function to compute Stirling numbers of the second kind S(n,k).
Lucas Sequence
Implement a function to compute the n-th Lucas number using iteration or recursion with memoization.
Binomial Coefficient
Implement a function to compute binomial coefficients modulo 10^9+7 for n up to 10^5.
Add without plus
Implement a function that adds two integers using only bitwise operations, no arithmetic plus or minus.
Levenshtein Distance
Implement the classic Levenshtein distance algorithm to measure string similarity.
Max Profit from Selling Twice
Compute the maximum profit that can be achieved by completing at most two buy-sell transactions on a given price array.
Bell number
Implement a function to compute the Bell number B(n) using dynamic programming.
Min cost climbing stairs
Compute the minimum total cost to reach the top of a staircase, given you can climb 1 or 2 steps at a time.
House Robber
Given a list of house values, return the maximum sum you can rob without robbing two adjacent houses.
House Robber Circular
Solve the House Robber problem with houses arranged in a circle.
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.
Showing 25–48 of 148 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.