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
Data Structures & Algorithms easy

Argsort Indices

Implement a function that returns the indices that would sort a list of integers, with ties broken by original order.

sorting indices lists
+8 pts 10m
Data Structures & Algorithms medium

Level Order Traversal

Implement a function that performs a level order traversal of a binary tree and returns node values as a list of lists.

binary-tree queue bfs
+20 pts 25m
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 easy

Memory view slice

Implement chunk_list that splits a list into consecutive sublists of a given chunk size.

slicing lists chunking
+10 pts 15m
Iterators & Generators easy

Pairwise Sequence Pairs

Write a generator function pairwise that yields each consecutive overlapping pair from any iterable as lists.

generators iterators pairs
+10 pts 15m
Iterators & Generators easy

Zip Longest Fill

Create an iterator that yields lists from multiple iterables, padding with a fill value when lengths differ.

generators zip iteration
+8 pts 12m
Math & Number Theory easy

Dot Product of Vectors

Implement a function that returns the dot product of two numeric vectors.

math lists dot-product
+10 pts 10m
Math & Number Theory medium

Correlation Coefficient

Write a pure-Python function that computes the Pearson correlation coefficient between two lists of numbers.

statistics math arrays
+15 pts 15m
Dynamic Programming easy

Triangle Minimum Path

Compute the minimum path sum from top to bottom of a triangle given as a list of lists.

dynamic-programming bottom-up arrays
+12 pts 20m
Recursion & Backtracking medium

Combination Generator

Write a recursive function that returns all combinations of length k from a list of distinct integers.

recursion backtracking combinations
+25 pts 25m
Greedy Algorithms medium

Queue Reconstruction by Height

Given shuffled pairs of (height, number_of_taller_people_in_front), reconstruct the original queue order.

greedy sorting insertion
+25 pts 25m
Binary Search medium

Find k Closest Elements to Target

Return exactly k elements from a sorted list that are closest to a given target, preserving order.

binary-search sorting two-pointers
+20 pts 20m
Two Pointers & Sliding Window medium

Interval List Intersections

Given two lists of sorted, disjoint intervals, return the list of intersections between them.

two-pointers intervals merging
+20 pts 20m
Linked Lists easy

Count nodes in a linked list

Return how many values appear in the list (one per node).

linked-list lists pointers
+10 pts 12m
Linked Lists easy

Read the head node value

Return the first value or None when the list is empty.

linked-list lists pointers
+10 pts 12m
Linked Lists easy

Read the tail node value

Return the last value or None when the list is empty.

linked-list lists pointers
+10 pts 12m
Linked Lists easy

Reverse a linked list copy

Return a new list with node values in reverse order without mutating the input.

linked-list lists pointers
+10 pts 12m
Linked Lists easy

Concatenate two linked lists

Append the second list's nodes after the first and return a new list.

linked-list lists pointers
+10 pts 12m
Linked Lists easy

Value at index n

Return the value at zero-based index n or None if out of range.

linked-list lists pointers
+10 pts 12m
Linked Lists easy

Middle node index

Return the floor middle index for a non-empty list.

linked-list lists pointers
+10 pts 12m
Linked Lists easy

Sum all node values

Add every integer payload in the list.

linked-list lists pointers
+10 pts 12m
Linked Lists easy

Maximum node value

Return the largest integer or None when empty.

linked-list lists pointers
+10 pts 12m
Linked Lists easy

Remove the head node

Return a new list without the first node.

linked-list lists pointers
+10 pts 12m
Linked Lists medium

Prepend a new head

Insert value at the front of the list.

linked-list lists pointers
+22 pts 20m

Showing 73–96 of 116 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.