Jump Game Minimum Jumps
Given an array of non-negative integers where each element is the maximum jump length, compute the minimum jumps to reach the last index.
Maximum subarray (Kadane)
Find the contiguous subarray with the largest sum.
Rotate array
Rotate a list right by k positions in place.
Product except self
Return an array where output[i] is the product of all elements except nums[i], without using division.
Product of All Except Zeros Handling
Given a list of integers, return a list where each element is the product of all other elements, handling zeros correctly.
Find Duplicate Number
Given a list of n+1 integers in the range 1..n, find the one integer that appears more than once.
Partition Array
Implement a function that finds a contiguous partition of a list into k groups, minimizing the maximum sum of the groups.
Two Missing Numbers
Given a list of n-2 unique integers from 1 to n, find the two missing numbers efficiently.
Three Missing Numbers
Find the three missing numbers from a shuffled list containing all but three integers from 1 to n.
Count Smaller Numbers
Given an integer list, return for each position how many later elements are smaller than it.
Convolve 1D Signal
Write a function that computes the 1D convolution of two lists in 'full' mode.
Subarray sum equals K
Count the number of contiguous subarrays whose sum equals k.
Find Peak Element
Implement a function that returns the index of any peak element in an integer array.
K Closest Elements
Implement a function to return the k closest elements to a target in a sorted array.
Next greater element II
For each element in a circular array, find the next greater element (NGE) to its right, wrapping around.
Merge time intervals
Given a list of time intervals, merge all overlapping intervals and return the merged intervals.
Delete duplicates sorted II
Given a sorted list, remove duplicates in place so each element appears at most twice, returning the new length.
Arithmetic Slices Count
Given a list of integers, count how many contiguous subarrays of length at least 3 form an arithmetic sequence.
Correlation Coefficient
Write a pure-Python function that computes the Pearson correlation coefficient between two lists of numbers.
Kadane Variant: Maximum Product Subarray
Implement max_product_subarray(nums) that returns the maximum product of any contiguous subarray.
Max Profit from Selling Twice
Compute the maximum profit that can be achieved by completing at most two buy-sell transactions on a given price array.
House Robber Circular
Solve the House Robber problem with houses arranged in a circle.
Paint House Colors
Given a cost matrix, compute the minimum total cost to paint all houses with no two adjacent houses having the same color.
Target sum assignments
Given a list of integers and a target, count how many ways to assign + or - to each number so the total equals the target.
Showing 1–24 of 62 challenges · medium
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.