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.
Stock Buy Sell Once
Given daily stock prices, compute the maximum profit you can achieve from buying once and selling once later.
Assign Cookies
Given child greed factors and cookie sizes, return the maximum number of content children.
Lemonade Change
Simulate a lemonade stand and decide if you can provide change for each customer using only $5, $10, and $20 bills.
Maximize units on truck
Given box types with count and units per box, maximize total units loaded onto a truck.
Maximum Ice Cream Bars
Given costs of ice cream bars and coins, return the maximum number you can buy.
Search Insert Position
Return the index where a target should be inserted into a sorted list to maintain order.
Lower Bound Binary Search
Implement binary search to find the first index where an element is not less than a given target.
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.
First Bad Version
Implement a function to find the first bad version in a sorted range using binary search.
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.
Longest Substring Without Repeating Characters
Implement a function that returns the length of the longest substring without repeating characters.
Reduce array to zero
Given an array of non-negative integers, each operation chooses two indices and subtracts 1 from each if both are positive. Return the minimum number of operations to reduce the array to all zeros, or -1 if impossible.
Two Sum Sorted
Given a 1-indexed sorted array and a target, return the two indices that add up to the target.
Squares of Sorted Array
Implement a function that returns a sorted list of squares for a given non-decreasing integer array.
Container With Most Water
Compute the maximum area between two vertical lines in an array of heights.
Balanced brackets in string
Check if a string of brackets is properly balanced using a stack-based approach.
Next Greater Element
Return a list where each position holds the next greater element to the right, or -1 if none exists.
Max Stack Design
Implement a MaxStack class with push, pop, top, and get_max operations.
Min Heap Class
Build a MinHeap class with push, pop, peek, and size methods that maintain a valid min-heap.
Last Stone Weight
Given an array of stone weights, repeatedly smash the two heaviest stones and return the last remaining weight or 0.
Count nodes in a linked list
Return how many values appear in the list (one per node).
Showing 457–480 of 556 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.