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
Python Basics easy

Condition Variable Waiter

Implement a deterministic simulation of a waiter whose tray has limited capacity and who becomes busy for a fixed time after each pickup.

simulation queue control-flow
+10 pts 15m
Strings & Text easy

Safe Command Executor

Implement emulate_run that simulates running a command list and returns output and exit code.

string-parsing simulation lists
+8 pts 10m
Strings & Text easy

Crawler Log Folder

Given a list of folder navigation operations, compute the minimum steps required to return to the main folder.

strings stack simulation
+10 pts 15m
OOP & Classes medium

Design Twitter Feed

Implement a Twitter class with postTweet, getNewsFeed, follow, and unfollow methods.

classes sorting timeline
+25 pts 30m
OOP & Classes medium

Seat Manager Design

Implement a SeatManager class that supports reserving the smallest available seat and unreserving seats.

heap class-design simulation
+25 pts 25m
Graphs & Graph Algorithms medium

Jump Game on Graph

Implement a function that determines if you can reach the last node of a directed graph by jumping from node 0 to node n-1 using edges.

graphs bfs reachability
+25 pts 30m
Greedy Algorithms easy

Lemonade Change

Simulate a lemonade stand and decide if you can provide change for each customer using only $5, $10, and $20 bills.

greedy simulation counting
+10 pts 15m
Greedy Algorithms medium

Gas Station Circuit

Given gas and cost arrays for a circular route, determine the starting gas station index that allows a full loop, or -1 if none exists.

greedy arrays circular
+25 pts 20m
Binary Search medium

Minimum Speed to Arrive on Time

Given commute distances and a time limit, compute the minimum integer speed so you arrive on time.

binary-search simulation math
+25 pts 30m
Two Pointers & Sliding Window hard

Trapping Rain Water

Given an array of non-negative integers representing an elevation map, compute how much water it can trap after raining.

array two-pointers water-trapping
+40 pts 30m
Stacks & Queues medium

Validate Stack Sequences

Given two sequences of distinct integers, verify whether the second sequence is a valid pop order for a stack given the first sequence as push order.

stack simulation sequences
+20 pts 20m
Stacks & Queues medium

Asteroid Collision

Simulate asteroid collisions with a stack and return the remaining asteroids in original order.

stack simulation arrays
+20 pts 25m
Heaps & Priority Queues easy

Last Stone Weight

Given an array of stone weights, repeatedly smash the two heaviest stones and return the last remaining weight or 0.

heap priority-queue simulation
+10 pts 15m
Matrix & 2D Arrays medium

Spiral Matrix Order

Given a 2D matrix, return all elements in clockwise spiral order starting from the top-left.

matrix spiral traversal
+25 pts 25m
Matrix & 2D Arrays medium

Rotting Oranges Time

Given a grid of fresh, rotten, and empty cells, compute the minimum minutes until all fresh oranges rot, or -1 if some are unreachable.

bfs grid simulation
+25 pts 25m
Matrix & 2D Arrays medium

Spiral Matrix Traversal

Implement a function that returns the elements of a 2D matrix in clockwise spiral order.

matrix traversal simulation
+20 pts 25m
Matrix & 2D Arrays medium

Largest Plus Sign

Compute the largest possible plus sign of 1s in an n x n grid with some cells set to 0.

matrix dynamic-programming simulation
+25 pts 30m

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.