Index of peak element
Implement a function that returns the index of any peak element in a given integer array.
Previous Smaller Element
Find the nearest previous index with a smaller value for every element in an array.
Exponential Search
Implement exponential search to find any valid index of a target in a sorted list.
Find Peak Index
Given a list of integers, return the index of any peak element where the value is not smaller than its neighbors.
Peak Element in Array
Implement a function that returns the index of any peak element in a list of integers.
Jump Search
Implement the jump search algorithm to locate a target in a sorted list, returning its index or -1.
Find Rightmost Set Bit
Implement a function that returns the 1-indexed position of the rightmost set bit of a positive integer, or 0 if none.
Set kth Bit
Implement a function that sets the kth bit (0-indexed) of a non-negative integer to 1 and returns the result.
Toggle kth Bit
Implement a function that toggles the kth bit of a non-negative integer (0-indexed from the least significant bit) and returns the new integer.
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.
Two Sum Sorted
Given a 1-indexed sorted array and a target, return the two indices that add up to the target.
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 25–39 of 39 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.