Quicksort
Implement quicksort and return a sorted list.
Graph DFS
Return all nodes reachable from a start node via DFS.
Employee Hierarchy
Build an employee hierarchy tree and compute the total number of direct and indirect reports for each employee.
Merge Sort
Implement merge_sort(numbers) that returns a sorted copy of the input list using the merge sort algorithm.
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.
Strobogrammatic number II
Given a positive integer n, return all strobogrammatic numbers of length n in ascending order.
Showing 1–7 of 7 challenges · Data Structures & Algorithms
Data Structures & Algorithms — Python coding challenges
What you will find here
This page lists data structures & algorithms challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.
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.