Binary Search Tree Class
Build a BinarySearchTree class and a sequence runner that executes a list of operations.
Postorder Traversal
Implement a function that returns the postorder traversal of a binary tree as a list of node values.
Minimum Cut
Given an undirected graph in adjacency-list form, return the size of the minimum edge cut that disconnects the graph.
Alien Dictionary Order
Given a sorted list of words in an alien language, derive the order of its unique letters.
Graph Valid Tree
Determine if n nodes and an edge list form a valid tree (connected and acyclic).
Find center of star graph
Write a function that finds the center node of a star graph from its list of edges in O(1) time.
Topological Sort via DFS
Return a deterministic topological ordering of nodes in a directed acyclic graph using DFS, or an empty list if a cycle exists.
Clique Detection
Given an undirected graph and a list of vertices, check if every pair of distinct vertices in the list is connected by an edge.
Possible bipartition
Given N people and a list of mutual dislikes, check if they can be divided into two groups with no dislike inside a group.
Graph Coloring Backtrack
Given an adjacency list and a number of colors, decide if the graph can be colored so no adjacent vertices share a color.
Permutation Generator
Write a function that returns all permutations of a list of distinct integers.
Combination Generator
Write a recursive function that returns all combinations of length k from a list of distinct integers.
Permutations
Write a function that returns every permutation of the elements in the input list.
Permutations II
Return all distinct permutations of a list of integers that may include duplicates.
Subsets
Return all subsets (the power set) of a list of distinct integers.
Partition Equal Subset Sum (Backtracking)
Write a function that uses backtracking to decide if a list of positive integers can be partitioned into two subsets with equal sum.
Power set from set
Write a function to return the power set of a given list of distinct elements.
Combination Sum
Given a list of distinct positive integers and a target, return all unique combinations that sum to the target.
Meeting Rooms Minimum
Given a list of meeting time intervals, compute the minimum number of conference rooms required.
Boats to Save People
Given a list of people weights and a boat's weight limit, return the minimum number of boats required.
Queue Reconstruction by Height
Given shuffled pairs of (height, number_of_taller_people_in_front), reconstruct the original queue order.
Non-overlapping Intervals
Given a list of intervals, return the minimum number of intervals to remove to make the rest non-overlapping.
Max events attended
Given a list of events with start and end times, find the maximum number of non-overlapping events you can attend.
Interpolation Search
Implement interpolation search in Python on a sorted list of integers.
Showing 193–216 of 273 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.