Tech Interview Questions

Practice 9,160+ interview questions from top companies including Google, Meta, Amazon, and more. Filter by company, role, and category.

Popular Interview Questions

Machine Learning Engineer + Data Scientist + Software Engineer Interview Questions

Practice the exact questions companies are asking right now.

9.2k Questions 486 Companies08.11.2026
Showing 20 results
Role
Google logo
Google
Medium
Data Scientist

Compute precision–recall curve on imbalanced data

You receive a CSV with columns: actual_label ∈ {0,1} and predicted_prob ∈ [0,1]; the positive class rate is ≈5%. a) Which evaluation metrics would you...

Coding & Algorithms
10
0
82 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Minimize L2, L1, and quantile losses

Given an array X of n real numbers, derive the value θ that minimizes the sum of squared deviations Σ(xi−θ)² (mean) and the sum of absolute deviations...

Coding & Algorithms
7
0
64 people solved
Oct 13, 2025
Meta logo
Meta
Hard
Data Scientist Locked

Design hashtag recommender with cold start

This question evaluates expertise in recommender-system design, feature engineering, ranking and learning-to-rank models, cold-start strategies, evalu...

Machine Learning
3
0
41 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Compute join counts and window ranks

Given the following small schema and data, answer all parts precisely and justify each count/output. Tables and rows: Customers(cust_id INT PRIMARY KE...

Data Manipulation (SQL/Python)
7
0
60 people solved
Oct 13, 2025
Amazon logo
Amazon
Hard
Data Scientist

Diagnose and fix underperforming ML model

Rapidly Improving Recall Under Class Imbalance (One-Day Plan) Context You inherit a binary fraud detection model with severe class imbalance (positive...

Machine Learning
8
0
75 people solved
Oct 13, 2025
OneMain Financial logo
OneMain Financial
Medium
Data Scientist

Transform clickstream with pandas sessionization

Given a pandas DataFrame events with columns [user_id:int, ts:str ISO8601 or NaT, url:str, server_log_ts:datetime], build 30-minute inactivity session...

Data Manipulation (SQL/Python)
5
0
62 people solved
Oct 13, 2025
OneMain Financial logo
OneMain Financial
Medium
Data Scientist

Write SQL for cohort retention and ARPU

Using PostgreSQL, compute monthly signup cohort D30 retention and 30-day ARPU. Cohort month = date_trunc('month', signup_date). D30 retention = users ...

Data Manipulation (SQL/Python)
2
0
48 people solved
Oct 13, 2025
OneMain Financial logo
OneMain Financial
Medium
Data Scientist Locked

Choose evaluation metrics for imbalanced risk model

This question evaluates understanding of cost-sensitive decision making, probabilistic thresholding, evaluation metric selection under class imbalance...

Machine Learning
6
0
50 people solved
Oct 13, 2025
Capital One logo
Capital One
Medium
Data Scientist

Decide whether to partner with Groupon

Decision: Partner with Groupon (Restaurant Unit Economics) Context You are the restaurant owner evaluating a Groupon partnership. The offer structure ...

Behavioral & Leadership
3
0
40 people solved
Oct 13, 2025
Block (Square) logo
Block (Square)
Medium
Data Scientist

Write left-join queries with tricky filters

Assume 'today' = '2025-09-01'. Do NOT use window functions (e.g., RANK). Use LEFT JOIN, COUNT(DISTINCT), GROUP BY, HAVING as appropriate. Schema: - us...

Data Manipulation (SQL/Python)
3
0
64 people solved
Oct 13, 2025
Meta logo
Meta
Medium
Data Scientist

Compare Instagram vs. Facebook using causal experiments

Compare Instagram and Facebook for consumer time and engagement: a) Define a single-objective OEC that captures healthy cross-app ecosystem value with...

Analytics & Experimentation
3
0
38 people solved
Oct 13, 2025
Meta logo
Meta
Medium
Data Scientist

Model comment count distribution and validate assumptions

You observe daily comment counts per post on a large social app are highly skewed with many zeros. a) Choose an appropriate discrete model among Poiss...

Statistics & Math
4
0
68 people solved
Oct 13, 2025
Apple logo
Apple
Medium
Data Scientist

Find longest uniform substring after k replacements

Given a string s (ASCII, length up to 2e5) and integer k (0 ≤ k ≤ |s|), return the length of the longest substring that can be turned into all the sam...

Coding & Algorithms
4
0
47 people solved
Oct 13, 2025
Capital One logo
Capital One
Medium
Data Scientist

Identify country with highest sunny-day probability

Write SQL to find the country with the highest probability that a day is sunny. Use the schema and sample data below. Rules: consider a day sunny for ...

Data Manipulation (SQL/Python)
10
0
81 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Count buggy vs non-buggy by employer

Count buggy vs non-buggy submissions for each employer_id, including employers with zero submissions. Return employer_id, buggy_count, non_buggy_count...

Data Manipulation (SQL/Python)
1
0
10 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Maximize products bought under budget

Given N products and M customers, for each customer find the list of distinct products they can buy without exceeding their budget such that the numbe...

Coding & Algorithms
3
0
45 people solved
Oct 13, 2025
TikTok logo
TikTok
Medium
Data Scientist

Select max-discount product per category

You have a catalog of products. For each category, return exactly one product: the one with the largest absolute discount; if multiple products in the...

Data Manipulation (SQL/Python)
1
0
9 people solved
Oct 13, 2025
Zoox logo
Zoox
Medium
Data Scientist Locked

Design navigation-safety simulation parameters and experiments

This question evaluates competency in designing simulation-based safety evaluations for autonomous navigation, including specification of scene parame...

Machine Learning
13
0
109 people solved
Oct 13, 2025
Fetch Rewards logo
Fetch Rewards
Medium
Data Scientist

Handle unresponsive stakeholders and align metrics

You have 45 minutes, two interviewers are minimally responsive, and the problem statement is vague. Walk through how you will proactively drive clarit...

Behavioral & Leadership
8
0
67 people solved
Oct 13, 2025
Fetch Rewards logo
Fetch Rewards
Medium
Data Scientist

Write SQL to verify quarterly sales decline

You are given a single dataset for a beverage company and must decide whether Q2 2024 truly declined. Write one standard SQL query that produces a com...

Data Manipulation (SQL/Python)
0
0
6 people solved
Oct 13, 2025