Fibonacci(n)
Return the nth Fibonacci number efficiently.
Longest Substring with K Repeating Characters
Return the length of the longest substring of a given string in which every character appears at least K times.
Basic Calculator
Implement a function that evaluates a simple arithmetic expression with +, -, *, / and parentheses.
Jump Game Minimum Jumps
Given an array of non-negative integers where each element is the maximum jump length, compute the minimum jumps to reach the last index.
Run-length encoding
Compress consecutive identical characters, e.g. 'aaabbc' → 'a3b2c1'.
Longest common prefix
Find the longest common prefix among a list of strings.
Integer to Roman
Convert a positive integer to its Roman numeral representation.
Zigzag string conversion
Encode a string in zigzag order across numRows rows, then read row by row.
Find all anagrams
Return all starting indices where any anagram of a given word appears as a substring.
Substring Anagrams
Return all start indices in a string where a substring of length k is an anagram of a pattern string.
Longest Palindrome Substring
Given a string s, return the longest substring that reads the same forwards and backwards.
Simplify Path
Implement a function that simplifies a Unix-style absolute file path to its canonical form.
Minimum Remove Valid Parentheses
Given a string with parentheses and letters, remove the fewest parentheses to make it valid.
Custom Sort String
Given a string s and an order string, reorder s so that characters that appear in order come first in that order, and all other characters are appended in stable original order.
Change directory manager
Implement a function that processes `cd` commands and returns the resulting absolute path.
Parse key-value lines
Parse structured key-value lines into a dictionary with support for quoted values and escaped characters.
Additive number sequence
Check whether a given digit string can be partitioned into a valid additive sequence where each term is the sum of the previous two.
Maximum subarray (Kadane)
Find the contiguous subarray with the largest sum.
Rotate array
Rotate a list right by k positions in place.
Flatten nested list
Yield every integer from an arbitrarily nested list, depth-first.
Merge intervals
Merge all overlapping intervals and return a sorted result.
Product except self
Return an array where output[i] is the product of all elements except nums[i], without using division.
Product of All Except Zeros Handling
Given a list of integers, return a list where each element is the product of all other elements, handling zeros correctly.
Partition around a pivot value
Implement an in-place partition of a list around a given pivot value, returning the boundary index.
Showing 1–24 of 323 challenges · medium
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.