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.
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.
Group anagrams
Group words that are anagrams of each other.
Complex Number Class
Implement a Complex class supporting addition, subtraction, multiplication, division, equality, and string formatting.
Decode Ways
Count the number of ways to decode a numeric string into letters using the mapping A=1 to Z=26.
Basic Calculator II
Evaluate a basic arithmetic expression with +, -, *, / following operator precedence.
Strobogrammatic number II
Given a positive integer n, return all strobogrammatic numbers of length n in ascending order.
Validate Email Regex
Implement a function that validates email addresses using regex with specific rules.
Match Credit Card Pattern
Write a function that validates a credit card number string against a set of formatting rules.
Levenshtein Distance
Implement the classic Levenshtein distance algorithm to measure string similarity.
Longest Common Subsequence
Given two strings, compute the length of the longest subsequence common to both.
Longest Palindromic Subsequence
Compute the length of the longest palindromic subsequence in a given string.
Showing 1–24 of 51 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.