Wildcard Match (Simple)
Write a function that checks whether a string matches a pattern with '*' and '?' wildcards.
Generate Parentheses
Given n, generate all valid strings of n pairs of parentheses.
Letter Combinations of a Phone Number
Given a string of digits, return all possible letter combinations that the number could represent on a phone keypad.
Word Search Backtrack
Determine if a given word exists in a 2D board by tracing adjacent cells without reusing any cell.
Palindrome Partitioning
Given a string s, return all possible palindrome partitioning of s.
Remove invalid parentheses
Given a string with parentheses and letters, return all valid strings after removing the minimum number of invalid parentheses.
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.
Partition Labels
Partition a string into maximal parts where each character appears in only one part, returning part lengths.
Remove K Digits to Form the Smallest Number
Given a non-negative integer as a string, remove exactly k digits to form the smallest possible integer without leading zeros.
Longest Substring Without Repeating Characters
Implement a function that returns the length of the longest substring without repeating characters.
Minimum Window Substring
Implement a sliding window algorithm to find the minimum window substring containing all characters of a given pattern.
Character Replacement Window
Given a string and a number k, find the length of the longest substring that can be made uniform by replacing at most k characters.
Permutation in String
Determine if any permutation of a shorter string appears as a contiguous substring in a longer string using an efficient sliding window.
Longest Substring with At Most K Distinct Characters
Given a string and an integer k, find the length of the longest substring that contains at most k distinct characters.
Minimum Window Subsequence
Given strings s and t, return the minimum window substring of s that contains t as a subsequence, or empty string if none exists.
Longest Repeating Character Replacement
Given a string and an integer k, return the length of the longest substring that can be made of identical characters after at most k replacements.
Balanced brackets in string
Check if a string of brackets is properly balanced using a stack-based approach.
Decode String Stack
Decode a compressed string with repeated substrings like '3[a2[c]]' to 'accaccacc' using a stack-based approach.
Remove K Digits Stack
Remove k digits from a non-negative integer string to produce the smallest possible number using a stack-based approach.
Score of Parentheses
Given a balanced parentheses string, compute its score where () is 1 and concatenation sums, nesting multiplies by 2.
Decode Nested String
Implement a function that decodes a string with nested encoding patterns.
Join node values with arrows
Format string node values as 'a -> b -> c'; empty list returns ''.
Word Search Matrix
Given a 2D board and a word, determine if the word can be formed by sequentially adjacent cells (horizontally or vertically), without reusing cells.
Regions Cut by Slashes
Given a grid of slashes, count the number of connected regions formed by the slashes and the grid borders.
Showing 169–192 of 219 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.