Tech Interview Questions

Practice 9,031+ 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.0k Questions 480 Companies08.05.2026
Showing 20 results
Role
Two Sigma logo
Two Sigma
Medium
Data Scientist

Analyze NYC taxi trips efficiently over last 7 days

Use today = 2025-09-01. Consider NYC taxi trip data over the last 7 days inclusive (2025-08-26 to 2025-09-01, America/New_York). You receive two datas...

Data Manipulation (SQL/Python)
0
0
12 people solved
Oct 13, 2025
Meta logo
Meta
Hard
Data Scientist Locked

Control error under multiple testing

This question evaluates a candidate's understanding of multiple hypothesis testing, sequential monitoring, and error-rate control—specifically familyw...

Statistics & Math
2
0
33 people solved
Oct 13, 2025
Netflix logo
Netflix
Medium
Data Scientist

Aggregate D1 retention cohorts in SQL

Today is 2025-09-01. Using SQL (optionally outline a pandas approach too), compute daily engagement and D1 retention for the last 7 days (2025-08-26 t...

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

Implement max profit with K transactions (DP)

Given an array prices[0..n-1] of daily stock prices and an integer k, implement a bottom-up dynamic program to compute the maximum achievable profit w...

Coding & Algorithms
3
0
31 people solved
Oct 13, 2025
Roku logo
Roku
Medium
Data Scientist

Write SQL for profit, growth, retention

Write ANSI-SQL (PostgreSQL preferred) for the tasks below. Assume all timestamps are UTC and that "today" = 2025-09-01. Schema: - products(product_id ...

Data Manipulation (SQL/Python)
6
0
93 people solved
Oct 13, 2025
Gemini logo
Gemini
Medium
Data ScientistSenior+

Write SQL/Python for ACH fraud analytics

As of today (2025-09-01), use the following schema and tiny samples to answer. Provide SQL for the SQL parts and Python for the Python part. Schema - ...

Data Manipulation (SQL/Python)
4
0
50 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Analyze video flags and reviews with SQL

You are designing SQL queries for YouTube Trust & Safety. Use the schema and sample data below. Unless stated otherwise, treat a flag as reviewed if t...

Data Manipulation (SQL/Python)
28
2
244 people solved
Oct 13, 2025
Meta logo
Meta
Medium
Data Scientist

Build DiD dataset with SQL

Using the schema and sample data below, write SQL to build an individual-day panel suitable for staggered-adoption DiD of the shuttle’s effect on part...

Data Manipulation (SQL/Python)
4
0
56 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Write SQL/Python for messy event data

Using the schema and sample data below, write: (1) a single SQL query to compute daily metrics for the local date 2025-09-01 in America/Los_Angeles, a...

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

Write SQL to analyze group-call concurrency

You are given call data and must compute group-call metrics. Schema (timestamps are UTC): Tables: - calls(call_id INT PRIMARY KEY, host_user_id INT, s...

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

Run a clean A/B test for autocomplete

This question evaluates experimental-design and causal-inference competency for online A/B testing of ML-ranked autocomplete, covering metric formulat...

Analytics & Experimentation
3
0
30 people solved
Oct 13, 2025
Snapchat logo
Snapchat
Medium
Data Scientist

Compute same-day acceptance metrics last week

Assume today is 2025-09-01; interpret 'last week' as 2025-08-25 through 2025-08-31 inclusive, using UTC dates. You have the following schema and sampl...

Data Manipulation (SQL/Python)
0
0
6 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Generate primes up to n efficiently

Implement a function that returns all prime numbers in the inclusive range 1..n. Requirements: handle n up to 10^7 efficiently (time and memory); retu...

Coding & Algorithms
5
0
36 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Append country tables and rank salaries in USD

You have separate country-level employee tables that must be appended and ranked by salary converted to USD using an exchange rate table. SQL schema a...

Data Manipulation (SQL/Python)
0
0
6 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Compute array modes with ties and no-mode rule

Write a function that returns the mode(s) of an integer array. Requirements: if all values are unique, return an empty list (there is no mode); allow ...

Coding & Algorithms
3
0
31 people solved
Oct 13, 2025
Meta logo
Meta
Medium
Data Scientist

Calculate survey response and quality metrics in SQL

Compute survey response-rate and quality metrics from event data. Assume "today" = 2025-09-01, and compute over the last 7 days (2025-08-26 to 2025-09...

Data Manipulation (SQL/Python)
0
0
7 people solved
Oct 13, 2025
Medium
Data Scientist

Build SQL pivot with lookups and currency conversion

You are given the following schema and sample data. Use SQL (or Python with SQL-like transforms) to answer the tasks below. Treat amounts as gross rev...

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

Implement multiplication without using the multiplication operator

Implement int multiply(int a, int b) without using * or /. You may use +, −, bitwise operators, and shifts. Requirements: - Handle negatives, zero, an...

Coding & Algorithms
2
0
37 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Add a conditional column in Python

Using pandas, add a derived column to a table based on multiple conditions with strict precedence and missing-value handling. Given the sample DataFra...

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

Implement longest subarray summing to k

Given an integer array nums (length ≤ 200,000; values may be negative) and integer k, return the maximum length and the [l, r] indices of a contiguous...

Coding & Algorithms
8
0
68 people solved
Oct 13, 2025