Bipartite Graph Check
Implement a function to check if an undirected graph is bipartite using graph coloring.
Cheapest Flights Within K Stops
Implement a function to compute the cheapest flight price from source to destination with at most K stops in a directed weighted graph.
Strongly Connected Components (Kosaraju's Algorithm)
Implement a function to find strongly connected components in a directed graph using Kosaraju's algorithm.
Minimum Genetic Mutation
Implement a function to compute the minimum number of single-character mutations needed to transform one gene string into another, using a given bank of valid mutations.
Jump Game on Graph
Implement a function that determines if you can reach the last node of a directed graph by jumping from node 0 to node n-1 using edges.
Combination Generator
Write a recursive function that returns all combinations of length k from a list of distinct integers.
Partition Equal Subset Sum (Backtracking)
Write a function that uses backtracking to decide if a list of positive integers can be partitioned into two subsets with equal sum.
Ternary Search
Implement ternary search to locate the maximum of a discrete unimodal function.
Find Minimum in Rotated Sorted Array
Implement a function that finds the minimum element in a rotated sorted array of distinct integers in O(log n) time.
Find in Mountain Array
Implement a function to search for a target value in a mountain array using binary search.
Binary Search on Answer: Find the Minimal Maximum Subarray Sum
Implement a function that finds the minimal possible maximum subarray sum when splitting an array into at most k contiguous subarrays.
Rotated Array Search II
Implement a function to search for a target in a rotated sorted array with possible duplicates.
Book Allocation: Minimize Maximum Pages
Implement a function that returns the minimized maximum pages when allocating a list of books to k students.
Reverse Pairs Count
Implement a function to count reverse pairs in an array efficiently.
Boats to Save People – Two Pointer
Implement a function that returns the minimum number of boats needed to rescue everyone, given a weight limit and each boat carrying at most two people.
Decode Nested String
Implement a function that decodes a string with nested encoding patterns.
Kth Largest Element in an Array (Heap Edition)
Implement a function that returns the kth largest element in an unsorted integer array using a heap.
Spiral Matrix Traversal
Implement a function that returns the elements of a 2D matrix in clockwise spiral order.
Shift 2D Grid
Implement a function to shift a 2D grid right by k positions, flattening the grid and wrapping elements.
Julian Day Number Converter
Implement two functions to convert between Gregorian calendar dates and Julian Day Numbers using a standard formula.
Easter Date Calculator
Implement a function that returns the date of Easter Sunday for a given year using the Gregorian computus algorithm.
Base64 Encode/Decode
Implement two functions to encode and decode Base64 strings using the standard alphabet and padding.
Flatten nested JSON
Write a function that flattens nested JSON objects into a flat dictionary with dot-separated keys, handling lists and empty objects.
Base64 Encode Decode
Implement Base64 encoding and decoding functions that handle padding and all standard characters.
Showing 49–72 of 73 challenges · medium
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.