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

Calculate posts per DAU by country today

Given two tables: - user_activity(user_id INT, activity_date DATE, country STRING, dau_flag TINYINT CHECK(dau_flag IN (0,1))) - composer(user_id INT, ...

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

Compute daily post success rate for last 7 days

You have a table composer(user_id INT, event STRING CHECK(event IN ('enter','post','cancel')), event_date DATE). Compute the post success rate for eac...

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

Write SQL for geo posting-frequency drops

Using the schema below, write a single ANSI SQL query (window functions allowed) that identifies countries with the largest share of creators whose po...

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

Write SQL to compute shop visibility share

Assume today is 2025-09-01. Compute the top 3 shops by average daily visibility share over the last 7 days (2025-08-26 to 2025-09-01, inclusive) for U...

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

Write SQL with HAVING and efficient joins

You are given two tables. Schema - interactions(product_id INT, buyer_id INT, seller_id INT, interaction_date DATE, interaction_type VARCHAR, interact...

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

Impute missing values without leakage

Given a DataFrame df with columns: user_id, event_date (datetime), country (categorical), device_type (categorical), age (numeric), income (numeric), ...

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

Merge seven tables into one clean DataFrame

Using pandas only (no loops over rows), write a function build_facts(customers, orders, order_items, products, payments, shipments, refunds) -> pd.Dat...

Data Manipulation (SQL/Python)
0
0
3 people solved
Oct 13, 2025
Boston Consulting Group logo
Boston Consulting Group
Medium
Data Scientist

Query top spenders and 7-day growth

Assume 'today' = 2025-09-01. Write a SQL query to: (1) for each model, compute total revenue in the last 7 days (2025-08-26 to 2025-09-01 inclusive) a...

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

Manipulate and merge DataFrames correctly

Given three pandas DataFrames: customers customer_id, join_date, tier 101, 2025-01-02, gold 102, 2025-02-10, silver 103, 2025-03-05, gold products mod...

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

Produce dating profile funnel report by cohort

You work on a dating app. Produce a daily profile-funnel report for 2025-08-25 through 2025-09-01 inclusive, with one row per day, gender, and age_buc...

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

Compute French DAU video-call percentage yesterday

Compute the percentage of daily active users (DAU) from France who were on at least one video call yesterday (2025-08-31 UTC). DAU is defined as users...

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

Compute callers contacting >3 people last 7 days

Using the schema below, write a single SQL query to return the number of unique callers who started calls with more than 3 distinct other users during...

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

Load and visualize large CSV robustly

You're screen-sharing in a HackerRank environment with Python 3, pandas, numpy, seaborn, and matplotlib available. You are given a single file data.cs...

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

Implement randomized Quickselect without k-shift bug

Implement randomized Quickselect to return the k-th largest element (1-based k, 1 ≤ k ≤ n) from an unsorted integer array. Use an in-place partition t...

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

Compute 95th-percentile call concurrency

Given N call sessions as half-open intervals [start, end) in UNIX seconds, design an algorithm to compute the 95th percentile of per-minute concurrent...

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

Write SQL for 7-day WhatsApp call metrics

Today is fixed as 2025-09-01. Using PostgreSQL, write a single query that returns one row per UTC calendar date for the last 7 days inclusive of today...

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

Write SQL for revenue and advertiser analyses

Use the schema below and ANSI SQL. Treat “today” as 2025-09-01. Schema: - active_ads(date DATE, ad_id INT, advertiser_id INT, creation_source VARCHAR,...

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

Solve subset-count and kth-factor problems

Two Independent Tasks A) Maximum Count Under Sum Constraint You are given an integer array arr and an integer budget n. Return the maximum number of e...

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

Use pandas to aggregate, pivot, and label

Given two pandas DataFrames, write code to: (1) merge and aggregate revenue; (2) produce a 2x2 pivot; (3) compute per-state counts with value_counts, ...

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

Write SQL for initiators and French DAU%

You are given the following PostgreSQL tables. Assume all timestamps are UTC and "today" is 2025-09-01. For any reference to "last 7 days," use the in...

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