Sliding window maximum
Return the maximum of each window of size k as it slides across an array.
Curry a function
Auto-curry any multi-argument function so it returns partial applications until fully saturated.
Longest increasing subsequence
Return the length of the longest strictly increasing subsequence.
Topological sort (Kahn)
Return a valid topological ordering of tasks, or [] if a cycle exists.
Word ladder length
Return the length of the shortest transformation from beginWord to endWord changing one letter at a time.
Median of Two Sorted Arrays
Given two sorted arrays, return the median of the combined sorted array in O(log(min(n,m))) time.
Palindrome Partitioning Minimum Cuts
Given a string, return the minimum number of cuts needed such that every substring in the partition is a palindrome.
Dijkstra Shortest Path
Implement Dijkstra's algorithm on a weighted graph to return distances from a source to every node.
Minimum Cut
Given an undirected graph in adjacency-list form, return the size of the minimum edge cut that disconnects the graph.
Remove invalid parentheses
Given a string with parentheses and letters, return all valid strings after removing the minimum number of invalid parentheses.
Kth Smallest in Sorted Matrix
Implement kth_smallest(matrix, k) to return the kth smallest element in a row- and column-sorted square matrix.
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.
Second node value
Return the second value or None if fewer than two nodes.
Drop the tail node
Return a new list without the last node.
Join node values with arrows
Format string node values as 'a -> b -> c'; empty list returns ''.
Compare two linked lists
Return True when both lists have identical values in order.
Index of maximum value
Return index of largest value (first on tie).
Inclusive numeric range vector
Return [start, start+step, ...] through end inclusive.
Count elements in matrix
Return total scalar count.
Binarize vector at threshold
Return 1.0 where v[i] >= t else 0.0.
Showing 1–20 of 20 challenges · hard
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.