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.
Add without plus
Implement a function that adds two integers using only bitwise operations, no arithmetic plus or minus.
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.
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.
Triangle Minimum Path
Compute the minimum path sum from top to bottom of a triangle given as a list of lists.
Derangement count
Implement a function to count derangements of n items using the classic recurrence.
Tiling dominoes count
Given a 2 x n board, count the distinct tilings using 2 x 1 dominoes.
Minimum Depth of Tree
Given a binary tree, compute the minimum depth from the root to the nearest leaf node.
Best Time to Buy and Sell Stock
Given a list of daily stock prices, determine the maximum profit achievable by buying on one day and selling on a later day.
Reduce array to zero
Given an array of non-negative integers, each operation chooses two indices and subtracts 1 from each if both are positive. Return the minimum number of operations to reduce the array to all zeros, or -1 if impossible.
Min Heap Class
Build a MinHeap class with push, pop, peek, and size methods that maintain a valid min-heap.
Valid Sudoku Board
Determine if a 9x9 Sudoku board is valid by checking rows, columns, and 3x3 sub-boxes.
Valid Sudoku Validator
Determine if a given 9x9 Sudoku board is valid by checking rows, columns, and 3x3 boxes.
Datetime to Unix timestamp
Parse a datetime string and convert it to a Unix timestamp assuming UTC.
Duration Human Readable
Write a function that turns a number of seconds into a human-readable duration like '2 hours, 1 minute'.
Daylight saving check
Given a date in the US, determine if daylight saving time starts or ends on that day.
Minimum element in vector
Return smallest value or None when empty.
Min-max normalize vector
Scale values to 0..1; equal values become all 0.0.
Constant Time Compare
Write a function that compares two strings without leaking length or content via timing.
Showing 25–48 of 50 challenges · easy
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.