Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

467 challenges 330 easy 120 medium 17 hard
Lists & Arrays hard

Sliding window maximum

Return the maximum of each window of size k as it slides across an array.

sliding-window deque arrays
+40 pts 35m
Functions & Closures hard

Curry a function

Auto-curry any multi-argument function so it returns partial applications until fully saturated.

functional closures inspect
+35 pts 30m
Data Structures & Algorithms hard

LRU cache decorator

Implement @lru_cache(maxsize=N) for unary functions using OrderedDict.

decorators caching OrderedDict
1
+50 pts 40m
Data Structures & Algorithms hard

Longest increasing subsequence

Return the length of the longest strictly increasing subsequence.

dp binary-search LIS
+45 pts 40m
Data Structures & Algorithms hard

Topological sort (Kahn)

Return a valid topological ordering of tasks, or [] if a cycle exists.

graph BFS topological-sort
+45 pts 40m
Data Structures & Algorithms hard

Word ladder length

Return the length of the shortest transformation from beginWord to endWord changing one letter at a time.

BFS graph strings
+45 pts 40m
Data Structures & Algorithms hard

Median of Two Sorted Arrays

Given two sorted arrays, return the median of the combined sorted array in O(log(min(n,m))) time.

median binary search arrays
+45 pts 40m
Advanced Python hard

Data pipeline

Implement a Pipeline class supporting pipe chaining with the | operator.

functional OOP pipeline
1
+40 pts 35m
Advanced Python hard

Validated descriptor

Implement a TypedField descriptor that raises TypeError if the value is not of the expected type.

descriptors OOP metaclass
+40 pts 35m
Regular Expressions hard

Match IPv6 Address

Write a function that uses a regex to validate whether a string is a fully expanded IPv6 address.

regex validation ipv6
+25 pts 30m
Dynamic Programming hard

Palindrome Partitioning Minimum Cuts

Given a string, return the minimum number of cuts needed such that every substring in the partition is a palindrome.

dynamic-programming palindrome strings
+40 pts 35m
Dynamic Programming hard

Egg Drop Puzzle

Given k eggs and n floors, compute the minimum number of attempts required in the worst case to find the highest safe floor.

dynamic-programming optimization classic-puzzle
+45 pts 35m
Graphs & Graph Algorithms hard

Dijkstra Shortest Path

Implement Dijkstra's algorithm on a weighted graph to return distances from a source to every node.

dijkstra graph heap
+35 pts 30m
Graphs & Graph Algorithms hard

Minimum Cut

Given an undirected graph in adjacency-list form, return the size of the minimum edge cut that disconnects the graph.

graphs max-flow min-cut
+40 pts 35m
Two Pointers & Sliding Window hard

Trapping Rain Water

Given an array of non-negative integers representing an elevation map, compute how much water it can trap after raining.

array two-pointers water-trapping
+40 pts 30m
Two Pointers & Sliding Window hard

Minimum Window Substring

Implement a sliding window algorithm to find the minimum window substring containing all characters of a given pattern.

sliding-window two-pointers strings
+45 pts 35m
Two Pointers & Sliding Window hard

Subarrays with K different ints

Count the number of contiguous subarrays that contain exactly K distinct integers.

sliding-window two-pointers hashmap
+40 pts 40m

Showing 17 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

  1. Pick a category — basics, algorithms, strings, and more
  2. Open a challenge, read the statement, and edit the starter code
  3. 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.