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
Lists & Arrays easy

Merge two sorted arrays

Merge two sorted arrays into one sorted array.

arrays merge two-pointer
+12 pts 12m
Lists & Arrays medium

Merge intervals

Merge all overlapping intervals and return a sorted result.

intervals sort
+30 pts 26m
Lists & Arrays easy

Interleave Two Lists

Write a function that interleaves two lists element by element, preserving order.

lists merge indexing
+10 pts 10m
Lists & Arrays medium

Count Smaller Numbers

Given an integer list, return for each position how many later elements are smaller than it.

arrays counting merge-sort
+20 pts 20m
Lists & Arrays easy

Merge Sorted Array In Place

Write a function that merges two sorted arrays into the first array in-place, keeping the result sorted.

arrays sorting in-place
+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
Dicts & Sets easy

Merge dicts summing values

Write a function that merges two dictionaries by summing values for duplicated keys.

dicts merge sum
+10 pts 10m
Dicts & Sets medium

Hash map merge

Write a function that merges two dictionaries recursively, combining values and preserving structure.

dictionaries recursion merging
+15 pts 15m
Data Structures & Algorithms medium

Count inversions lite

Implement a function that counts inversions in a list of numbers efficiently.

inversions sorting merge sort
+25 pts 25m
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 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

Merge Two Sorted Lists

Write a function that merges two sorted lists into a single sorted list.

merge sorting lists
+10 pts 15m
Data Structures & Algorithms medium

Merge time intervals

Given a list of time intervals, merge all overlapping intervals and return the merged intervals.

intervals sorting arrays
+20 pts 20m
Data Structures & Algorithms hard

Merge K Sorted Lists

Write a function that merges multiple sorted lists into a single sorted list.

merge sorting heap
+45 pts 40m
Data Structures & Algorithms medium

Accounts Merge

Given a list of accounts, merge those that share any email and return sorted accounts.

union-find graph sorting
+28 pts 30m
Dynamic Programming hard

Create Maximum Number

Given two arrays of digits and an integer k, merge them to form the largest number of length k.

arrays greedy dynamic-programming
+40 pts 35m
Linked Lists medium

Merge two sorted lists

Merge two ascending integer lists into one sorted list.

linked-list lists pointers
+22 pts 20m

Showing 1–17 of 17 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.