Coin change (DP)
Find the minimum number of coins to make exactly the target amount.
Count inversions lite
Implement a function that counts inversions in a list of numbers efficiently.
Employee Hierarchy
Build an employee hierarchy tree and compute the total number of direct and indirect reports for each employee.
Bubble Sort
Implement bubble sort that sorts a list of numbers in ascending order.
Selection Sort Implementation
Implement selection sort to sort a list of numbers in ascending order.
Merge Sort
Implement merge_sort(numbers) that returns a sorted copy of the input list using the merge sort algorithm.
Bucket Sort
Implement bucket sort to sort a list of floating-point numbers in the range [0,1).
Decode Ways
Count the number of ways to decode a numeric string into letters using the mapping A=1 to Z=26.
Online Stock Span
Implement StockSpanner.next(price) that returns the maximum number of consecutive days (including today) with price <= current price.
Eulerian Path Check
Given the number of vertices and an edge list of an undirected graph, decide if it has an Eulerian path.
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 12 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.