Validate Email Regex
Implement a function that validates email addresses using regex with specific rules.
Multiline anchor match
Extract lines beginning with a plain-text prefix from multiline strings using Python's re module.
Match Balanced Parentheses with Regex
Write a function that uses regular expressions to determine if parentheses are balanced and properly nested.
Clamp and round to nearest ten
Clamp a number between given bounds and round the result to the nearest ten with halves away from zero.
Lucas Sequence
Implement a function to compute the n-th Lucas number using iteration or recursion with memoization.
Multiply without multiply
Write a function that multiplies two integers using only addition, subtraction, and bit shifts — no * operator.
Chinese Remainder Theorem
Solve a system of congruences with pairwise coprime moduli using the Chinese Remainder Theorem.
Stars and Bars Count
Implement stars_and_bars_count(n, k) which returns the number of ways to put n identical items into k distinct bins, with bins allowed to be empty.
Missing Number XOR
Given a list of n distinct numbers from 0 to n with one missing, use XOR to find and return the missing number.
Isolate Rightmost Set Bit
Given an integer, return a number with only its rightmost set bit set.
Bitwise AND of a Range
Given a range [a, b], return the bitwise AND of all integers in that inclusive range without iterating over all numbers.
Add without plus
Implement a function that adds two integers using only bitwise operations, no arithmetic plus or minus.
Divide using shifts
Implement division of two integers using only bit shifts and arithmetic, without using division or modulo operators.
Clear Rightmost Set Bit
Write a function clear_rightmost_set_bit that accepts a non-negative integer and returns the integer with its rightmost set bit cleared.
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 with Obstacles
Given a 2D grid with obstacles, count the unique paths from top-left to bottom-right moving only down or right.
Unbounded Knapsack
Given item weights and values with unlimited copies, find the maximum total value that fits in a knapsack capacity.
Partition Equal Subset
Determine whether a given list of positive integers can be partitioned into two subsets with equal sum.
Paint House Colors
Given a cost matrix, compute the minimum total cost to paint all houses with no two adjacent houses having the same color.
Buy Sell Stock with Cooldown (DP)
Given daily stock prices, compute the maximum profit you can achieve if you must wait one day after selling before buying again.
Longest Arithmetic Subsequence
Given a list of integers, return the length of the longest arithmetic subsequence (constant difference) within it.
Cherry Pickup Maximum
Given a grid with cherries, find the maximum cherries you can collect using two paths from top-left to bottom-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.
Showing 97–120 of 191 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.