Basic Calculator II
Evaluate a basic arithmetic expression with +, -, *, / following operator precedence.
Design Front Middle Back Queue
Implement a data structure that supports push/pop at front, middle, and back of a queue.
Online Stock Span
Implement StockSpanner.next(price) that returns the maximum number of consecutive days (including today) with price <= current price.
Merge Two Sorted Lists
Write a function that merges two sorted lists into a single sorted list.
Trie Insert and Search
Implement a Trie and a scenario runner that executes insert/search/prefix operations.
Jump Search
Implement the jump search algorithm to locate a target in a sorted list, returning its index or -1.
Flood Fill Algorithm
Implement flood fill on a 2D grid using BFS/DFS.
Eulerian Path Check
Given the number of vertices and an edge list of an undirected graph, decide if it has an Eulerian path.
AST Visitor Lite
Implement a depth-first traversal of a simplified AST and return identifier names in order.
Merge time intervals
Given a list of time intervals, merge all overlapping intervals and return the merged intervals.
Delete Old Records
Filter a list of records by removing those with a date older than a given cutoff date.
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.
Consecutive available seats
Given a list of seat statuses, return the length of the longest consecutive run of available (0) seats.
Argsort Indices
Implement a function that returns the indices that would sort a list of integers, with ties broken by original order.
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.
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.
N-Queens Solutions
Implement a function to count the number of distinct ways to place n queens on an n×n board.
Matchsticks to Square
Given a list of matchstick lengths, decide if they can form a square by using each matchstick exactly once.
Merge K Sorted Lists
Write a function that merges multiple sorted lists into a single sorted list.
Memory view slice
Implement chunk_list that splits a list into consecutive sublists of a given chunk size.
Delete Middle Node
Implement a function that deletes a given non-tail node from a singly linked list in O(1) time.
Design Browser History
Implement a BrowserHistory class that supports visit, back, and forward navigation with step counts.
Design Skip List Lite
Implement a simplified skip list supporting insert, search, and delete with O(log n) average complexity.
Delete duplicates sorted II
Given a sorted list, remove duplicates in place so each element appears at most twice, returning the new length.
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
- Pick a category — basics, algorithms, strings, and more
- Open a challenge, read the statement, and edit the starter code
- 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.