Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

925 challenges 556 easy 323 medium 46 hard
Strings & Text easy

Is pangram

Write a function that determines whether a given string is a pangram, ignoring case and non-letter characters.

strings sets algorithm
+8 pts 12m
Strings & Text easy

Find substring index

Implement a function that returns the starting index of the first occurrence of a substring using only basic string indexing and slicing.

string search index
+10 pts 15m
Lists & Arrays easy

Counting Sort

Implement the counting sort algorithm to sort a list of non-negative integers in O(n + k) time.

sorting counting arrays
+10 pts 15m
Lists & Arrays easy

Sort List Merge Sort

Write a function that sorts a list of integers using the merge sort algorithm.

merge sort sorting recursion
+10 pts 15m
Lists & Arrays easy

Insertion Sort

Implement insertion sort that sorts a list in-place and returns the same list.

sorting in-place algorithms
+8 pts 12m
Data Structures & Algorithms easy

Bubble Sort

Implement bubble sort that sorts a list of numbers in ascending order.

sorting arrays algorithms
+8 pts 12m
Data Structures & Algorithms easy

Selection Sort Implementation

Implement selection sort to sort a list of numbers in ascending order.

sorting selection-sort algorithm
+10 pts 15m
Data Structures & Algorithms medium

Merge Sort

Implement merge_sort(numbers) that returns a sorted copy of the input list using the merge sort algorithm.

sorting recursion divide-and-conquer
+30 pts 30m
Data Structures & Algorithms medium

Heap Sort Implementation

Implement the heap sort algorithm to sort a list of comparable elements in non-decreasing order.

heap sorting in-place
+20 pts 25m
Data Structures & Algorithms medium

Bucket Sort

Implement bucket sort to sort a list of floating-point numbers in the range [0,1).

sorting bucket-sort insertion-sort
+25 pts 30m
Data Structures & Algorithms easy

Shell Sort

Implement Shell sort, an in-place comparison sort that generalizes insertion sort, using a gap sequence that shrinks by half each pass.

sorting shell-sort in-place
+10 pts 15m
Data Structures & Algorithms easy

Exponential Search

Implement exponential search to find any valid index of a target in a sorted list.

searching sorted-array algorithms
+10 pts 15m
Data Structures & Algorithms hard

Count of Range Sum

Count contiguous subarrays whose sum lies in a given inclusive range using an efficient divide-and-conquer algorithm.

prefix-sum merge-sort divide-conquer
+35 pts 40m
Data Structures & Algorithms easy

Jump Search

Implement the jump search algorithm to locate a target in a sorted list, returning its index or -1.

search sorted list
+10 pts 15m
Data Structures & Algorithms medium

Flood Fill Algorithm

Implement flood fill on a 2D grid using BFS/DFS.

grid bfs dfs
+20 pts 25m
Math & Number Theory medium

Zeller Congruence Weekday

Implement a function that returns the weekday name for a given date using Zeller's congruence.

math modular-arithmetic date
+20 pts 20m
Math & Number Theory medium

Extended Euclidean Algorithm

Implement the extended Euclidean algorithm to return (gcd, x, y) such that ax + by = gcd(a, b).

gcd extended-euclidean number-theory
+30 pts 25m
Bit Manipulation easy

Isolate Rightmost Set Bit

Given an integer, return a number with only its rightmost set bit set.

bit-manipulation bitwise algorithms
+10 pts 10m
Bit Manipulation easy

Brian Kernighan count

Implement a function that counts set bits using Brian Kernighan's efficient algorithm.

bit-manipulation integers counting
+10 pts 15m
Bit Manipulation medium

Maximum XOR Pair

Implement max_xor_pair(nums) that returns the maximum XOR value obtainable by pairing any two numbers in the given list.

bit-manipulation xor array
+25 pts 30m
Dynamic Programming medium

Levenshtein Distance

Implement the classic Levenshtein distance algorithm to measure string similarity.

strings dynamic-programming edit-distance
+30 pts 30m
Dynamic Programming medium

Edit Distance (Levenshtein Distance)

Implement the classic edit distance algorithm to find the minimum number of single-character edits required to transform one string into another.

dynamic-programming strings levenshtein-distance
+25 pts 30m
Dynamic Programming medium

Coin Change Minimum

Given coin denominations and a target amount, compute the minimum number of coins needed or -1 if impossible.

dynamic-programming coins minimum
+30 pts 25m
Graphs & Graph Algorithms hard

Dijkstra Shortest Path

Implement Dijkstra's algorithm on a weighted graph to return distances from a source to every node.

dijkstra graph heap
+35 pts 30m

Showing 1–24 of 36 challenges

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

  1. Pick a category — basics, algorithms, strings, and more
  2. Open a challenge, read the statement, and edit the starter code
  3. 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.