Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

467 challenges 330 easy 120 medium 17 hard
Python Basics medium

Fibonacci(n)

Return the nth Fibonacci number efficiently.

recursion dp memoization
+15 pts 15m
Lists & Arrays medium

Maximum subarray (Kadane)

Find the contiguous subarray with the largest sum.

dp arrays kadane
+25 pts 20m
Data Structures & Algorithms medium

Coin change (DP)

Find the minimum number of coins to make exactly the target amount.

dp greedy
+30 pts 28m
Data Structures & Algorithms hard

Longest increasing subsequence

Return the length of the longest strictly increasing subsequence.

dp binary-search LIS
+45 pts 40m
Dynamic Programming medium

Levenshtein Distance

Implement the classic Levenshtein distance algorithm to measure string similarity.

strings dynamic-programming edit-distance
+30 pts 30m
Dynamic Programming medium

Kadane Variant: Maximum Product Subarray

Implement max_product_subarray(nums) that returns the maximum product of any contiguous subarray.

kadane subarray product
+30 pts 25m
Dynamic Programming medium

Bell number

Implement a function to compute the Bell number B(n) using dynamic programming.

dp combinatorics math
+25 pts 25m
Dynamic Programming easy

Climbing Stairs

Implement a function that returns the number of distinct ways to climb n stairs using steps of 1 or 2.

fibonacci dp counting
+10 pts 15m
Dynamic Programming medium

Longest Palindromic Subsequence

Compute the length of the longest palindromic subsequence in a given string.

strings dp subsequence
+25 pts 30m
Dynamic Programming medium

0/1 Knapsack

Implement the classic 0/1 Knapsack dynamic programming solution to maximize value under a weight capacity.

dynamic-programming knapsack optimization
+30 pts 25m
Dynamic Programming medium

Target Sum Subsets

Write a function that counts the number of subsets of a list of positive integers that sum exactly to a target.

subset-sum dp counting
+25 pts 30m
Dynamic Programming medium

Coin Change Minimum

Given coin denominations and a target amount, compute the minimum number of coins needed or -1 if impossible.

dynamic-programming coins minimum
+30 pts 25m
Dynamic Programming medium

Perfect Squares Sum

Given a positive integer n, return the least number of perfect squares (e.g., 1, 4, 9, 16, ...) that sum to n.

dynamic-programming math optimization
+25 pts 25m
Dynamic Programming medium

Word Break DP

Implement a function to check if a string can be segmented into space-separated dictionary words.

dynamic-programming strings word-break
+20 pts 25m
Dynamic Programming medium

Buy Sell Stock with Cooldown (DP)

Given daily stock prices, compute the maximum profit you can achieve if you must wait one day after selling before buying again.

dynamic-programming state-machine stocks
+25 pts 25m
Dynamic Programming medium

Longest Arithmetic Subsequence

Given a list of integers, return the length of the longest arithmetic subsequence (constant difference) within it.

dp subsequence hashmap
+30 pts 25m
Graphs & Graph Algorithms medium

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.

graphs shortest-path dp
+30 pts 30m

Showing 17 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

  1. Pick a category — basics, algorithms, strings, and more
  2. Open a challenge, read the statement, and edit the starter code
  3. 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.