Profile time decorator
Create a decorator that tracks how many times a function is called and its cumulative execution time.
Benchmark decorator
Implement a benchmarking decorator that records call count and timing statistics per function.
Validate Email Regex
Implement a function that validates email addresses using regex with specific rules.
Match Credit Card Pattern
Write a function that validates a credit card number string against a set of formatting rules.
Smith Number Check
Write a function to check if a number is a Smith number by comparing digit sums of the number and its prime factorization.
Zeller Congruence Weekday
Implement a function that returns the weekday name for a given date using Zeller's congruence.
Polynomial Fit Coefficients
Implement a function that returns the coefficients of the best-fit quadratic polynomial for given points.
Multinomial coefficient
Write a function to compute the multinomial coefficient efficiently for given nonnegative counts.
Correlation Coefficient
Write a pure-Python function that computes the Pearson correlation coefficient between two lists of numbers.
Binomial Coefficient
Implement a function to compute binomial coefficients modulo 10^9+7 for n up to 10^5.
Bit Mask Permissions
Implement helper functions to compose bit masks and check permission bits using bitwise operators.
Bell number
Implement a function to compute the Bell number B(n) using dynamic programming.
Target Sum Subsets
Write a function that counts the number of subsets of a list of positive integers that sum exactly to a target.
Word Break DP
Implement a function to check if a string can be segmented into space-separated dictionary words.
Minimum Path Sum Matrix
Implement a function that computes the minimum path sum from the top-left to the bottom-right of a grid moving only right or down.
Lowest Common Ancestor in a Binary Tree
Implement a function to find the lowest common ancestor (LCA) of two nodes in a binary tree.
Delete Node in BST
Implement a function that deletes a key from a binary search tree and returns the new root.
Trim BST to range
Implement a function to trim a BST to only retain nodes with values in a given inclusive range.
Validate BST
Implement a function to determine if a binary tree is a valid Binary Search Tree.
Kth Smallest in BST
Implement a function that returns the k-th smallest value in a binary search tree.
Zigzag Level Order Traversal
Implement a function that returns the zigzag level-order traversal of a binary tree.
Articulation Points
Implement a function that returns the articulation points of an undirected graph.
Bridges in Graph
Implement a function that returns all bridges in an undirected graph.
Hamiltonian Path Check
Implement a function that checks whether an undirected graph has a Hamiltonian path using DFS and backtracking.
Showing 25–48 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.