practice a little every day — you've got this ♡
Machine Learning Interview Problems
Practice 5981 original coding, SQL, system design, machine learning and behavioral problems across 15 topics. Coding and SQL problems run against hidden test cases right in your browser; every problem has hints and a worked solution, free.
- 5981
- Problems
- 2215
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 271–300 of 512 results
- Machine LearningHardModel answerDesigning a Sponsored Product Ranking System for Search
Design an end-to-end ML pipeline that selects and ranks paid listings in e-commerce search results, balancing advertiser value, user relevance, and platform revenue.
Machine Learningads rankingrecommendation systemsmulti-task learningauction design - Machine LearningHardModel answerDesign a Recommendation Engine with a Conversational Layer
Design a personalized recommender from scratch, then add a chatbot that surfaces and explains those recommendations without hallucinating unavailable items.
Machine Learningrecommendation systemsretrievalLLMsystem design - Machine LearningMediumModel answerDiagnosing and Fixing a Degraded Forecasting System
Debug a time-series forecasting system experiencing accuracy decline by isolating failures, measuring impact, and implementing fixes.
Machine Learningml-systemstime-seriesdebuggingevaluation - Machine LearningMediumModel answerTwo-Stage Embedding Retrieval for a Rental Marketplace
Design a two-tower embedding retrieval plus ranking system for vacation rentals, covering representations, labels, bias correction, and evaluation.
Machine Learningrecsystwo-towersemantic-searchposition-bias - Machine LearningHardModel answerBuild an End-to-End Response Ranking System for a Chat Assistant
Design a full ML pipeline that scores and ranks N candidate responses per user query, covering labeling, modeling, serving, evaluation, and monitoring.
Machine Learningrankingreward-modelingRLHFml-system-design - Machine LearningMediumModel answerDiagnosing and Fixing a Train–Test Performance Gap
Given a supervised model that scores much higher on training data than on held-out data, explain the bias-variance trade-off and work through a systematic plan to close the gap.
Machine Learningoverfittingbias-varianceregularizationcross-validation - Machine LearningHardModel answerDesign a Personalized Feed Recommendation Engine
Design an end-to-end recommendation system for a large e-commerce platform, covering data pipelines, candidate retrieval, ranking, cold start, and evaluation.
Machine Learningrecommendation systemsML system designtwo-tower modelcandidate retrieval - Machine LearningMediumModel answerBuild a Scaled Dot-Product Multi-Head Attention Block
Write a PyTorch multi-head self-attention module that projects, splits into heads, attends, merges, and projects back to the input shape.
Machine Learningpytorchattentiontransformerstensor-shapes - Machine LearningMediumModel answerEnd-to-End Classification: Text Features, Ensembles, and CTR
Walk through a full supervised ML lifecycle covering bag-of-words pipelines, OOB validation, CTR modeling from data to deployment, and debugging a model that degrades in production.
Machine Learningclassificationfeature-engineeringctr-predictionrandom-forests - Machine LearningMediumModel answerProbability Calibration via Temperature Scaling: Derive and Code It
Derive the NLL gradient with respect to a single temperature scalar, then implement a numerically stable optimizer and calibrated inference function in Python.
Machine Learningcalibrationsoftmaxgradient-descentdeep-learning - Machine LearningMediumModel answerFeature Selection Mechanism in L1-Regularized Regression
Explain how and why L1 regularization drives coefficients to exactly zero, covering mathematical foundations, practical implications, and trade-offs.
Machine Learningregularizationfeature-selectionlassooptimization - Machine LearningHardModel answerBuilding and Evaluating a Personalized Content System
Walk through how you designed a personalized content system: what signals defined user interest, how you represented content and users, and how you validated that model updates actually improved outcomes.
Machine Learningembeddingslabelingmodel-evaluationproduction-ml - Machine LearningHardModel answerBuild a Bagging Ensemble Classifier from Scratch
Implement bootstrap sampling, multi-tree training, and majority-vote aggregation for a bagging classifier using only Python lists and the standard library.
Machine Learningensemble learningdecision treesbootstrap sampling - Machine LearningHardModel answerBuild a Machine Learning Document Search Engine
Design a production search system that combines keyword and semantic retrieval, enforces tenant-level access control, and ranks results with learned models.
Machine Learningml-systemsinformation-retrievalrankingembeddings - Machine LearningMediumModel answerEnsemble Methods: Training and Combining Multiple Models
Describe why aggregating predictions from several models often outperforms a single model, and compare common ensemble strategies.
Machine Learningensemble-learningbaggingboostingmodel-aggregation - Machine LearningHardModel answerDesign a Personalized Food Delivery Home Feed Ranker
Design an end-to-end ML system that ranks restaurants on a food delivery app's home screen to maximize orders and long-term user satisfaction.
Machine Learningrecommendation systemsrankingtwo-towermulti-task learning - Machine LearningHardModel answerDesigning a Credit Offer Recommendation Engine
Design an end-to-end ML system that serves personalized financial product offers to millions of users, handling sparse delayed conversion signals and strict latency requirements.
Machine Learningrecommendation systemsfeature engineeringdelayed feedbackmulti-task learning - Machine LearningEasyModel answerML Fundamentals: Bayes, Neural Nets, KNN, and Transformers
Work through four sets of ML fundamentals: a Bayes' rule posterior with a rare event, neural network arithmetic, KNN concept checks, and Transformer mechanics.
Machine Learningbayes-theoremneural-networksknntransformers - Machine LearningMediumModel answerDesigning a Churn Risk System: Classification vs. Survival
Design an end-to-end churn prediction system for a subscription business, choosing between windowed binary classifiers and time-to-event models, avoiding leakage, and turning scores into daily actions.
Machine Learningchurn-predictionsurvival-analysisclass-imbalancedata-leakage - Machine LearningHardModel answerEnd-to-End Personalized Ranking System: From Logs to Live Serving
Design a full recommendation pipeline covering data ingestion, feature engineering, model training and refresh, multi-stage serving architecture, and production reliability.
Machine Learningrecommendation systemsfeature storestwo-tower modelA/B testing - Machine LearningHardModel answerEmbedding Similarity: Top-K Retrieval and Evaluation
Implement cosine-similarity ranking over a set of candidate embeddings, handle edge cases explicitly, and reason through how you would evaluate whether the results are actually useful.
Machine Learningembeddingssimilarityevaluationpython - Machine LearningHardModel answerBuild a GLM from Scratch: Family, Link, and Optimizer
Design and implement a generalized linear model end-to-end, covering family and link selection, loss derivation, numerical stability, and prediction semantics.
Machine Learninggeneralized-linear-modelsmaximum-likelihoodnumerical-stability - Machine LearningMediumModel answerDebugging an Input-Starved Training Pipeline
Diagnose stalled GPU utilization across storage, CPU transforms, and transfer, then design a bounded, reproducible prefetch pipeline.
Machine Learningdata-loadinggpu-utilizationperformancetraining-infrastructure - Machine LearningMediumModel answerFrom Demonstrations to Preferences: SFT, DPO and PPO Compared
Explain SFT's token-likelihood objective, DPO's pairwise log-ratio loss, and how PPO fits into KL-regularized post-training.
Machine Learningpost-trainingDPOPPOSFT - Machine LearningEasyModel answerChoosing Between AI and Deterministic Logic in Product Features
Decide when a feature should use a model versus plain code, covering fit criteria, anti-patterns, AI-native design, and cost/trust trade-offs.
Machine Learningproduct-senseml-strategyml-system-designai-native - Machine LearningMediumModel answerFix a broken medical message routing classifier
Debug a telehealth triage service that returns wrong categories with negative confidence scores, then redesign the classification and escalation logic.
Machine Learningml-debugginghealthcaresafety-criticalapi-design - Machine LearningMediumModel answerCritique a Vision-Based Infrastructure Failure Prediction System
Identify the data, modeling, optimization, and deployment flaws in a proposal to train a CNN on public images to predict structural failures and generate safe designs.
Machine Learningcomputer-visionmodel-evaluationadversarial-mlsystem-design - Machine LearningHardModel answerWalk Through a Production ML System You Built
Describe one model you deployed in detail: formulation, features, training decisions, production issues, evaluation, and monitoring.
Machine Learningmodel-developmentproduction-mlfeature-engineeringevaluation - Machine LearningHardModel answerTaming a High-Variance Regressor Under a Latency Budget
Diagnose a severe train/validation RMSE gap on tabular data, then select, prioritize, and experimentally validate three overfitting interventions without exceeding a 20 ms inference limit.
Machine Learningregularizationoverfittinggradient-boostingfeature-engineering - Machine LearningMediumModel answerAutomated Ticket Routing for Multi-Team Engineering Organizations
Build an ML system that assigns incoming support tickets to the right engineering team, handling thousands of teams and high throughput.
Machine Learningclassificationnlpproduction-mlretrieval