Missing Number XOR
Given a list of n distinct numbers from 0 to n with one missing, use XOR to find and return the missing number.
Subset XOR sum
Given a list of integers, compute the bitwise XOR of each non-empty subset and return the sum of those XOR totals.
House Robber
Given a list of house values, return the maximum sum you can rob without robbing two adjacent houses.
Triangle Minimum Path
Compute the minimum path sum from top to bottom of a triangle given as a list of lists.
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.
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.
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.
Permutation Generator
Write a function that returns all permutations of a list of distinct integers.
Permutations
Write a function that returns every permutation of the elements in the input list.
Power set from set
Write a function to return the power set of a given list of distinct elements.
Search Insert Position
Return the index where a target should be inserted into a sorted list to maintain order.
Upper Bound Binary Search
Write a function that returns the index of the first element greater than a target in a sorted list.
Find Indices of Target in Sorted List
Given a sorted list and a target, return the indices of its first and last occurrence, or [-1, -1] if absent.
Best Time to Buy and Sell Stock
Given a list of daily stock prices, determine the maximum profit achievable by buying on one day and selling on a later day.
Squares of Sorted Array
Implement a function that returns a sorted list of squares for a given non-decreasing integer array.
Next Greater Element
Return a list where each position holds the next greater element to the right, or -1 if none exists.
Count nodes in a linked list
Return how many values appear in the list (one per node).
Read the head node value
Return the first value or None when the list is empty.
Read the tail node value
Return the last value or None when the list is empty.
Reverse a linked list copy
Return a new list with node values in reverse order without mutating the input.
Concatenate two linked lists
Append the second list's nodes after the first and return a new list.
Value at index n
Return the value at zero-based index n or None if out of range.
Middle node index
Return the floor middle index for a non-empty list.
Showing 145–168 of 186 challenges · easy
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.