practice a little every day — you've got this ♡
Machine Learning Interview Problems
Practice 5978 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.
- 5978
- Problems
- 2214
- Auto-graded
- 15
- Topics
- 272
- Added today
Showing 181–210 of 511 results
- Machine LearningMediumModel answerArchitecting Recommendation Engines for Item and User Cold-Start
Design candidate generation, ranking features, and exploration policies to serve zero-history users and rank newly published content in a large-scale video streaming system.
Machine Learningrecommendation-systemscold-startcandidate-generationranking - Machine LearningHardModel answerDesign an End-to-End Video Recommendation Platform
Architect an end-to-end video recommendation system covering objective setting, matrix factorization baselines, multi-stage retrieval/ranking, feature engineering, and evaluation strategies.
Machine Learningsystem-designrecommendation-systemsmatrix-factorizationmulti-stage-ranking - Machine LearningMediumModel answerCutting Serving Cost and Latency of a Fine-Tuned Transformer Classifier
Plan how to make a fine-tuned BERT-style text model faster and cheaper to serve, across model, runtime and request-path changes, while proving accuracy has not dropped.
Machine Learningbertinference-optimizationquantizationdistillation - Machine LearningHardModel answerBuilding and Analyzing Scaled Dot-Product Attention
Implement a production-grade multi-head attention module in PyTorch, handle numerical precision and causal masking, and analyze performance trade-offs for large sequences.
Machine Learningdeep learningattentionpytorchtransformers - Machine LearningHardModel answerValidate, Diagnose, and Monitor E-Commerce Search Ranking Models
A guide to designing temporal offline evaluation, position-bias correction, diagnostic leakage checks, multi-stage deployment, and online-offline metric alignment for search ranking models.
Machine Learninglearning to rankmodel validationposition biasmonitoring - Machine LearningMediumModel answerBuild a Reply-Probability Scorer: Feature Pipelines and Inference
Design an ML system that estimates whether a user will comment on a post in a community forum, emphasizing feature pipelines, training-serving consistency, and low-latency model deployment.
Machine Learningml-system-designfeature-storemodel-servingranking - Machine LearningHardModel answerDesign a Machine Learning System for Social Feed Ad Ranking
Design an end-to-end ML architecture to optimize feed ad click-through rates, detailing metric trade-offs, multi-stage serving pipelines, graph/two-tower embeddings, and bias mitigation.
Machine Learningsystem designrecommendation systemsclick-through rateembeddings - Machine LearningHardModel answerDesigning and Evaluating Production RAG Systems and Core LLM Concepts
Architect end-to-end RAG pipelines, optimize knowledge graph maintenance costs, evaluate LLM reliability, and master attention and fine-tuning mechanics.
Machine LearningRAGLLM EvaluationTransformersLoRA - Machine LearningMediumModel answerFixing and Scaling a Misbehaving CIFAR-10 Training Job
Diagnose a CIFAR-10 PyTorch job that stalls, hits NaNs, or runs slowly, then scale it with FSDP, reason about sparse gradient communication, and decide when custom kernels pay off.
Machine Learningpytorchdebuggingfsdpdistributed-training - Machine LearningHardModel answerForecasting Next-Day Energy Use Across Commercial Buildings
Design a full forecasting pipeline for next-day electricity use across many commercial buildings, from features and validation through deployment, monitoring, privacy and an ablation study.
Machine Learningtime-seriesregressionfeature-engineeringmlops - Machine LearningHardModel answerDefend a Tabular ML Project: Validation, Tuning, PCA, SHAP
Walk through one supervised ML project end to end, covering leakage, time-aware validation, feature choices and tuning, then derive PCA and explain SHAP and its pitfalls.
Machine Learningpcashapleakagetime-series-validation - Machine LearningMediumModel answerDesigning LLM-Generated Daily Briefs for Perishable Goods Logistics
Design a pipeline that adds LLM-written narrative insights to existing supply-chain reports while keeping numbers exact, data secure, and outputs verified before delivery.
Machine Learningllmraggroundingevaluation - Machine LearningMediumModel answerSelf-Attention Deep Dive: Q, K, V Roles and Transformer Design Trade-offs
Explain how self-attention builds queries, keys and values, what the value vectors do, and why Transformers handle long-range context better than recurrent models.
Machine Learningtransformersself-attentionqkvmulti-head-attention - Machine LearningMediumModel answerCore ML Concepts: Trees, Training Loops, Metrics, Embeddings, Attention
A five-part conceptual walkthrough covering ensembles of trees, supervised training, evaluation under imbalance, embeddings, and the basics of transformer attention.
Machine Learningdecision-treesgradient-boostingoverfittingevaluation-metrics - Machine LearningHardModel answerBuilding a Recommender: From Neighbors to Latent Factors
Compare neighborhood and matrix factorization recommenders, and explain loss, regularization, cold start, popularity bias, evaluation and large-catalog scaling.
Machine Learningrecommender-systemscollaborative-filteringmatrix-factorizationimplicit-feedback - Machine LearningMediumModel answerPredicting Itemizers vs Standard Filers for a Tax App
Design an interpretable, recall-oriented classifier that predicts whether a tax-software user should itemize deductions, covering preprocessing, features, imbalance-aware metrics and time-aware validation.
Machine Learningclassificationimbalanced-datafeature-engineeringtime-based-validation - Machine LearningMediumModel answerPadded-Token Smoothed Softmax Loss with Gradients in NumPy
Write a stable NumPy loss for sequence models that skips padded positions, smooths the target distribution, rescales logits by temperature, and returns the exact gradient with respect to the logits.
Machine Learningcross-entropylabel-smoothingnumpysoftmax - Machine LearningMediumModel answerChoosing and Validating a Loan Default Model Under Regulation
Compare logistic regression, random forests and boosted trees for predicting loan default, and explain how to validate them, treat rare defaults, and keep decisions explainable.
Machine Learningcredit-riskgradient-boostingclass-imbalancemodel-interpretability - Machine LearningMediumModel answerSplitting a Large Transformer: Intra-Layer vs Inter-Layer Sharding
Contrast sharding weights within each transformer layer against assigning consecutive layers to different devices, covering communication, bubbles, memory, and inference latency.
Machine Learningdistributed-trainingtensor-parallelismpipeline-parallelismtransformers - Machine LearningHardModel answerBuild a Multimodal Pipeline to Flag and Handle Unsafe Videos
Design an ML-driven system that screens uploaded and already-published videos for policy violations, blends automation with human reviewers, supports appeals, and resists evasion.
Machine Learningml-system-designcontent-moderationmultimodalhuman-in-the-loop - Machine LearningHardModel answerBuilding a GPU Memory Budget for LLM Fine-Tuning
Work out how much accelerator memory a language-model fine-tuning job needs, covering weights, gradients, optimizer state, activations, buffers, and parallelism, for both full and LoRA-style tuning.
Machine Learningllmfine-tuninggpu-memorylora - Machine LearningHardModel answerBuild a Nearby-Restaurant Ranking Pipeline for an App Homepage
Design a sub-100ms ML pipeline that picks and ranks open, deliverable restaurants for each user's homepage carousel, covering retrieval, ranking, cold start, and evaluation.
Machine Learningrecommender-systemscandidate-generationrankinggeospatial - Machine LearningMediumModel answerQuality Assurance Pipeline for a Compliance-Grade RAG Assistant
Design how to measure, gate, monitor, and debug a retrieval-augmented assistant that serves regulated, multi-tenant content, including root-cause triage of bad answers.
Machine Learningragllm-evaluationmlopsllm-as-judge - Machine LearningHardModel answerWhy Early Layers Stop Learning: Diagnosing Tiny Gradients
Explain why gradients can shrink as they flow backward through depth or time, how to detect it, and which fixes apply to which architectures, without confusing it with convergence.
Machine Learningdeep-learningbackpropagationvanishing-gradientsinitialization - Machine LearningMediumModel answerFrom Raw Text to Aligned Assistant: Building and Testing an LLM
Walk through how a foundation model becomes a safe, helpful assistant: pretraining, SFT versus preference optimization, reward modeling pitfalls, and evaluation including reward hacking detection.
Machine Learningllmrlhfdporeward-modeling - Machine LearningMediumModel answerWalk Through and Stress-Test Your Own Alpha Signal Research
Describe a signal-research project you built, defending how the signal was defined, scored, modeled and validated, and what the evidence does and does not prove.
Machine Learningquant-researchinformation-coefficientbacktestingfeature-engineering - Machine LearningMediumModel answerBuild a Pre-Release and Production Quality Gate for LLMs
Design an automated platform that checks new LLM versions and sampled production traffic for correctness, safety, and regressions, with reproducible runs and clear interfaces.
Machine Learningllm-evaluationml-system-designllm-as-judgeregression-testing - Machine LearningMediumModel answerSparse Expert Layers: Routing and Cross-Device Sharding
Describe how a sparse top-k expert feed-forward layer processes a token batch, and how placing experts on different devices changes communication, balance, and memory.
Machine Learningmixture-of-expertsexpert-parallelismdistributed-trainingrouting - Machine LearningMediumModel answerDesigning a Ranked Product Recommender with Role and Context Rules
Design an ML pipeline that builds personalized ranked product lists, using collaborative filtering and ranking models while respecting user role, context, and business constraints.
Machine Learningrecommender-systemscollaborative-filteringlearning-to-rankembeddings - Machine LearningMediumModel answerBuild a Pre-Norm Transformer Layer with a Gated SiLU Feed-Forward
Write a Transformer layer with masked multi-head self-attention, a gated Swish feed-forward network, residual paths and layer norm, and explain its shapes, masking and complexity.
Machine Learningtransformermulti-head-attentionswiglulayer-normalization