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.
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.
Pairwise Sequence Pairs
Write a generator function pairwise that yields each consecutive overlapping pair from any iterable as lists.
Zip Longest Fill
Create an iterator that yields lists from multiple iterables, padding with a fill value when lengths differ.
Dot Product of Vectors
Implement a function that returns the dot product of two numeric vectors.
Correlation Coefficient
Write a pure-Python function that computes the Pearson correlation coefficient between two lists of numbers.
Triangle Minimum Path
Compute the minimum path sum from top to bottom of a triangle given as a list of lists.
Combination Generator
Write a recursive function that returns all combinations of length k from a list of distinct integers.
Queue Reconstruction by Height
Given shuffled pairs of (height, number_of_taller_people_in_front), reconstruct the original queue order.
Find k Closest Elements to Target
Return exactly k elements from a sorted list that are closest to a given target, preserving order.
Interval List Intersections
Given two lists of sorted, disjoint intervals, return the list of intersections between them.
Count nodes in a linked list
Return how many values appear in the list (one per node).
Read the head node value
Return the first value or None when the list is empty.
Read the tail node value
Return the last value or None when the list is empty.
Reverse a linked list copy
Return a new list with node values in reverse order without mutating the input.
Concatenate two linked lists
Append the second list's nodes after the first and return a new list.
Value at index n
Return the value at zero-based index n or None if out of range.
Middle node index
Return the floor middle index for a non-empty list.
Sum all node values
Add every integer payload in the list.
Maximum node value
Return the largest integer or None when empty.
Remove the head node
Return a new list without the first node.
Prepend a new head
Insert value at the front of the list.
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
- 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.