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 medium

Basic Calculator II

Evaluate a basic arithmetic expression with +, -, *, / following operator precedence.

string stack arithmetic
+25 pts 30m
Data Structures & Algorithms medium

Design Front Middle Back Queue

Implement a data structure that supports push/pop at front, middle, and back of a queue.

queue deque data-structures
+25 pts 30m
Data Structures & Algorithms medium

Online Stock Span

Implement StockSpanner.next(price) that returns the maximum number of consecutive days (including today) with price <= current price.

stack monotonic-stack stock-span
+20 pts 25m
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

Trie Insert and Search

Implement a Trie and a scenario runner that executes insert/search/prefix operations.

trie insert search
+25 pts 25m
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
Data Structures & Algorithms medium

Eulerian Path Check

Given the number of vertices and an edge list of an undirected graph, decide if it has an Eulerian path.

graph eulerian degree
+25 pts 25m
Data Structures & Algorithms medium

AST Visitor Lite

Implement a depth-first traversal of a simplified AST and return identifier names in order.

trees traversal ast
+20 pts 20m
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 easy

Delete Old Records

Filter a list of records by removing those with a date older than a given cutoff date.

filtering datetime lists
+8 pts 10m
Data Structures & Algorithms medium

Top N per group

Implement top_n_per_group that returns the top N scores for each group from a list of (group, score) pairs.

sorting grouping dictionaries
+25 pts 25m
Data Structures & Algorithms easy

Consecutive available seats

Given a list of seat statuses, return the length of the longest consecutive run of available (0) seats.

arrays sliding-window greedy
+10 pts 15m
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 easy

Lowest Common Ancestor in a Binary Search Tree

Implement a function to find the lowest common ancestor of two node values in a binary search tree.

bst lca tree
+10 pts 15m
Data Structures & Algorithms hard

N-Queens Solutions

Implement a function to count the number of distinct ways to place n queens on an n×n board.

backtracking chess recursion
+40 pts 35m
Data Structures & Algorithms medium

Matchsticks to Square

Given a list of matchstick lengths, decide if they can form a square by using each matchstick exactly once.

backtracking dfs partition
+30 pts 30m
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
Data Structures & Algorithms medium

Delete Middle Node

Implement a function that deletes a given non-tail node from a singly linked list in O(1) time.

linked-list pointer in-place
+12 pts 15m
Data Structures & Algorithms medium

Design Browser History

Implement a BrowserHistory class that supports visit, back, and forward navigation with step counts.

browser-history stack design
+25 pts 20m
Data Structures & Algorithms medium

Design Skip List Lite

Implement a simplified skip list supporting insert, search, and delete with O(log n) average complexity.

skip-list linked-list search
+30 pts 30m
Data Structures & Algorithms medium

Delete duplicates sorted II

Given a sorted list, remove duplicates in place so each element appears at most twice, returning the new length.

arrays two-pointers in-place
+20 pts 20m

Showing 385–408 of 925 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.