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

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

Compute CTR and metrics with pandas

Using pandas only, compute banner and story metrics. Assume today is 2025-09-01 and 'last 7 days' means 2025-08-26 to 2025-09-01 inclusive. You are gi...

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

Define and compute shop visibility in SQL

You own the 'shop visibility' KPI for a marketplace. Define a precise metric and write SQL to compute it over the last 7 days (use today = 2025-09-01,...

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

Compute adoption, latency, and cross-region transactions

Invented schema: users(user_id INT PRIMARY KEY, user_region STRING, adopted_at TIMESTAMP NULL) transactions(txn_id INT PRIMARY KEY, user_id INT, txn_t...

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

Write SQL: sum values ≤ each row’s value

Given table numbers(id INT PRIMARY KEY, val INT), return for every row the sum of all val across the entire table that are ≤ that row’s val (i.e., com...

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

Manipulate data efficiently in Python

Answer the following: (a) Contrast list comprehensions and generators with respect to memory and evaluation; write a generator that yields rolling win...

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

Query conversion and retention with SQL windows

Schema and sample data (PostgreSQL): users(id, signup_date, country) 1 | 2025-08-20 | US 2 | 2025-08-25 | US 3 | 2025-08-27 | CA 4 | 2025-08-30 | US 5...

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

Explain SVM kernels and complexity

This question evaluates understanding of Support Vector Machines, including support vectors and primal/dual formulations, the kernel trick and why Gra...

Machine Learning
2
0
25 people solved
Oct 13, 2025
Coinbase logo
Coinbase
Medium
Data Scientist

Detect sequence rule and repair anomaly

Implement next_value(seq: list[int]) that detects the rule of a numeric sequence and returns a tuple (model_name, parameters, anomaly_index_or_None, n...

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

Write SQL to compare exclusive category engagement

You are given session-level data and must compare engagement between users who exclusively used the 'social' category versus those who exclusively use...

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

Aggregate weekly revenue and attribute 4% drop

Write SQL over the following schema to: (A) compute weekly revenue by ISO week (Monday–Sunday) from orders, excluding cancelled/refunded; revenue_usd ...

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

Increase posts receiving one comment

This question evaluates a data scientist's competency in product analytics and experimentation, specifically metric definition and guardrails, segment...

Analytics & Experimentation
2
0
46 people solved
Oct 13, 2025
Roblox logo
Roblox
Medium
Data Scientist

Match requests and accepts into friendships in SQL

Given two event tables, write a single SQL query (PostgreSQL) to output unique undirected friendships with the earliest valid friendship_date. Schema ...

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

Write SQL for shop visibility and activity metric

Assume 'today' is 2025-09-01. Schema and tiny samples: 1) shops(shop_id INT, created_at DATE) Sample: shop_id | created_at 1 | 2025-08-25 2 | 2025...

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

Compute rolling cold-delivery rates with windows

Assume a food-delivery platform with the following schema. Use PostgreSQL. A delivery is considered "cold" if food_temp_c < 40 at dropoff OR there is ...

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

Clean and aggregate factory event data in Pandas

You are given three Pandas DataFrames for a factory: (1) events[event_id, machine_id, ts_utc (datetime64[ns, UTC]), event_type in {'start','stop','fau...

Data Manipulation (SQL/Python)
0
0
8 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data ScientistSenior+

Implement streaming k-way merge with constraints

Implement a function merge_k(iterators, N) that returns the first N items of the global ascending order from k sorted, potentially unbounded iterators...

Coding & Algorithms
6
0
86 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data ScientistSenior+

Transform event logs with subscription windows in pandas

Using pandas, compute user-level subscription-aligned revenue and anomalies for September 2025. DataFrames: events(user_id:int, ts:UTC datetime, event...

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

Find top-spend categories per customer with ranking

Using the schema and sample data below, write a single ANSI SQL query (CTEs allowed; no temp tables) that returns, for each customer, their top 2 prod...

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

Compute unread and multi-account user percentages

You’re given two tables. Write ANSI-SQL to answer parts (a)–(d). Treat a notification as unread if read_at IS NULL. Denominator for user-level percent...

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