Practice
Free ML interview practice problems
543 free problems from real ML, data science and AI interviews, in 13 topics. Each page has the full statement and a link to solve it in your browser; answers are checked as you go and code runs against tests.
Pick a topic
- Coding & AlgorithmsData structures, algorithms and complexity — the coding rounds every ML/DS loop includes.95 free problems
- ML CodingImplement models and training loops from scratch in numpy — k-means, logistic regression, attention.127 free problems
- ProbabilityConditional probability, distributions, expectation — the backbone of every stats screen.46 free problems
- Statistics & InferenceEstimation, hypothesis tests, regression, confidence intervals, bootstrap.58 free problems
- A/B Testing & CausalExperiment design, power, variance reduction, pitfalls and causal inference.7 free problems
- Classical MLBias-variance, regularization, trees and ensembles, evaluation, feature engineering.46 free problems
- Deep LearningBackprop, optimizers, normalization, CNNs, RNNs, training dynamics.22 free problems
- LLMs & GenAITransformers, attention, tokenization, fine-tuning, RLHF, RAG, evals, inference.59 free problems
- ML System DesignRecommenders, ranking, ads, fraud — end-to-end systems, data to serving.39 free problems
- SQLJoins, window functions, aggregation — the query round for data roles.9 free problems
- Data Wranglingpandas and numpy: reshaping, grouping, cleaning, vectorization.5 free problems
- Linear Algebra & OptimizationMatrices, eigenvalues, SVD, gradients, convexity.21 free problems
- Product & MetricsMetric design, diagnosing metric changes, product sense for DS.9 free problems
Highest-rated free problems to start with
- Kruskal's MST with Union-FindCoding & AlgorithmsMedium
- Median of Two Sorted ArraysCoding & AlgorithmsHard
- Largest Rectangle in HistogramCoding & AlgorithmsHard
- Streaming Approximate Quantiles with Rank-Error GuaranteesCoding & AlgorithmsHard
- Reservoir Sampling from an Unknown-Length StreamCoding & AlgorithmsMedium
- Second Largest with Minimum ComparisonsCoding & AlgorithmsHard
- Multi-Head Causal Self-Attention From ScratchML CodingHard
- Running Median of a Data StreamCoding & AlgorithmsMedium
- Multi-Head AttentionML CodingMedium
- Personalized Product Feed for an Online StoreML System DesignHard
- Fix a Buggy Transformer, Then Add a KV CacheML CodingHard
- Moving Average Over a Data StreamCoding & AlgorithmsMedium