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
Google logo
Google
Medium
Data Scientist

Compute monthly CRR with merges and gaps

You are given PostgreSQL tables user_profile(user_id, signup_ts, country, is_employee, is_test), user_events(user_id, event_ts, event_type, revenue, p...

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

Compute survey rates and bias-correct ratings

Today is 2025-09-01. Use the schema and sample data below to answer A and B with SQL (standard SQL; you may use CTEs and window functions). Assume tim...

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

Measure and mitigate notification spam

This question evaluates a data scientist's competency in defining precise success and guardrail metrics, designing counterfactual-aware experiments an...

Analytics & Experimentation
3
0
33 people solved
Oct 13, 2025
Dropbox logo
Dropbox
Medium
Data Scientist

Compute max island with constrained flips

Given an n×n binary grid G where 1=land and 0=water with 4-directional connectivity, return the size of the largest island achievable by flipping at m...

Coding & Algorithms
5
0
49 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Deduplicate events and rank products with SQL

You are given two tables. Schema: - events(event_id INT PRIMARY KEY, user_id INT, product_id INT, event_time TIMESTAMP, idempotency_key TEXT, amount_c...

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

Write SQL for hashtag analytics and joins

Assume today = 2025-09-01. Schema and small sample data are below. Use ANSI SQL; explain any dialect-specific functions you choose. Where asked, expla...

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

Write SQL to localize anomaly and funnel

Given the schema and toy data below, write SQL to (a) validate instrumentation vs behavior change, (b) localize the 2025-09-01 Likes drop by app_versi...

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

Debug and test a Python function in venv

Consider the Python snippet below. """ import math def accumulate(nums, start=0, cache={}): total = start for n in nums: if n % 2 == 0: nums.appen...

Coding & Algorithms
7
0
100 people solved
Oct 13, 2025
CVS Health logo
CVS Health
Medium
Data Scientist

Aggregate radiology spend and derive fiscal month

Using Python/pandas, complete the tasks below. Assume the following CSV-like input, where service_dt is object dtype and amounts may be negative (adju...

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

Implement and extend My Calendar III

Design and implement a booking system like LeetCode 732 (My Calendar III). Provide a class with methods: book(start, end) using half-open intervals [s...

Coding & Algorithms
6
0
102 people solved
Oct 13, 2025
Voleon Group logo
Voleon Group
Medium
Data Scientist

Analyze time-zoned events with pandas

You are given two pandas DataFrames. events columns: user_id:int, ts:str ISO-8601 with timezone (e.g., '2025-08-31T23:58:43-07:00'), event:str in {'si...

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

Write SQL for 7-day geo-localized revenue dashboard

Write a single SQL query (assume PostgreSQL; tz_offset is an integer hour offset from UTC) to compute a 7-day dashboard by local user date for US vs A...

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

Transform retail data with pandas groupby/merge/concat

Using pandas only (groupby/agg/merge/concat; no for-loops), write code to answer the sub-questions below on the following small dataframes. Assume tim...

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

Implement weighted sampling without replacement

Implement in Python a function sample_k(items, weights, k) that returns k items without replacement with probability proportional to weight. Requireme...

Coding & Algorithms
8
0
121 people solved
Oct 13, 2025
Meta logo
Meta
Medium
Data Scientist

Label new vs old users over time in SQL

Define users as “new” during the first 30 days inclusive after their signup_date, and “old” thereafter. Produce per-user, per-day labels over a window...

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

Write SQL to compute max-overlap lists

Invented schema and sample data below. Assume 'today' is 2025-09-01 and 'last 7 days' means 2025-08-26 through 2025-09-01 inclusive. Only consider lis...

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

Find list pair with maximum overlap

You are given N labeled lists of items as a Python dict mapping list_name -> iterable of strings. Example input: {'L1': ['A','B','C'], 'L2': ['A','C',...

Coding & Algorithms
5
0
90 people solved
Oct 13, 2025
Meta logo
Meta
Medium
Data Scientist

Write SQL for engagement and attribution KPIs

Using the schema and sample data below, answer the SQL tasks. Assume timestamps are UTC and comments with is_deleted=1 do not count. Schema: users(use...

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

Compute and rank top bad advertisers

SQL on ad safety. Assume the following schema and sample rows. Use ANSI SQL. Today is 2025-09-01; interpret “last 7 days” as 2025-08-26 00:00:00 to 20...

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

Implement R dplyr simulation and left join

Using R and dplyr, run a simulation and a join. Data: prices item_id | price_usd 1 | 10.00 2 | 20.00 3 | 30.00 4 | 40.00 catalog item_id | category 1 ...

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