Fancy Index Select
Given a 2D matrix and a list of row indices, select those rows in order and return them as a new 2D list.
Two Sum
Return indices (i, j) with i < j such that nums[i] + nums[j] == target.
Keep only even indexes
Given a list, return a new list containing only the elements at even indices (0, 2, 4, ...).
Two Sum with Dict
Implement the classic Two Sum problem: return indices of two numbers that add up to a target using a dict.
Previous Smaller Element
Find the nearest previous index with a smaller value for every element in an array.
Peak Element in Array
Implement a function that returns the index of any peak element in a list of integers.
Argsort Indices
Implement a function that returns the indices that would sort a list of integers, with ties broken by original order.
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.
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.
Showing 1–10 of 10 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.