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.
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.
Strobogrammatic number II
Given a positive integer n, return all strobogrammatic numbers of length n in ascending order.
Showing 8 challenges · medium · 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.