Letter Tile Possibilities
Given a string of letter tiles, count the number of distinct non-empty sequences that can be formed using any non-empty subset in any order.
Beautiful Arrangement Count
Count the number of permutations of 1..n such that for every index i, either i is divisible by the number at that position or the number is divisible by i.
Lemonade Change
Simulate a lemonade stand and decide if you can provide change for each customer using only $5, $10, and $20 bills.
Nth Magical Number
Given three integers n, a, b, return the nth positive integer that is divisible by either a or b.
Count Nice Subarrays
Given an array of integers, count the number of contiguous subarrays that contain exactly k odd numbers.
Subarrays with K different ints
Count the number of contiguous subarrays that contain exactly K distinct integers.
Reverse Pairs Count
Implement a function to count reverse pairs in an array efficiently.
Subarray product less than K
Count contiguous subarrays where the product of all elements is strictly less than a target K.
Count Nice Subarrays
Count subarrays that contain exactly k odd numbers.
Top K Frequent Elements
Given an integer array and a number k, return the k most frequent elements using a heap-based approach.
Count square submatrices with all ones
Count all square submatrices consisting entirely of 1s in a binary matrix.
Showing 49–59 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.