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

Implement minimal-cost overtime/contractor allocation

You must cover H extra engineering hours this week at minimum cost using employee overtime and optional contractors. Each employee i has a maximum ove...

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

Write SQL for theme-park revenue and visits

You are given theme-park ticketing and visits data. Write SQL to answer the following, using the sample schema and tables below. Return both the query...

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

Write SQL to monitor weekly chargeback spikes

Write a single SQL query (PostgreSQL) to detect weekly chargeback spikes by country and industry. Week starts Monday (use date_trunc('week', ts) with ...

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

Implement percentage RMSE and bootstrap its CI

Given a CSV with columns [country, actual_revenue, predicted_revenue], define percentage RMSE as pRMSE = sqrt(mean_i((pred_i/actual_i − 1)^2)). a) Imp...

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

Generate binomial matrix and column-normalize

Using Python with NumPy, generate a 100×100 matrix of Binomial(n = 10, p = 0.3) draws with a fixed random seed, then normalize each column so it sums ...

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

Write SQL for hashtag source and safety rates

Write SQL for the two tasks below. Assume the schema and sample data as given, and that “today” is 2025‑09‑01. Deduplicate exact duplicates by (date, ...

Data Manipulation (SQL/Python)
0
0
9 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
40 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Find daily first-order merchants with SQL

Given the table below, write a single SQL query using window functions to: A) For each calendar date (UTC), return all merchant_id(s) whose order is t...

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

Design student–course data models and SQL

Scenario: Model a university domain with Students, Courses, Departments, Instructors, and Enrollments. Tasks: 1) OLTP ERD: Specify normalized tables w...

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

Solve two-sum variants at scale

Base task: Given nums = [3, 1, 2, 2, 4] and target = 4, return the 0-based index pair (i, j) with i < j such that nums[i] + nums[j] = target. If multi...

Coding & Algorithms
9
0
69 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Design idempotent daily loads with deduping

You need to load the last 7 days of orders into a large fact table from a noisy staging feed. Assume today is 2025-09-01. Requirements: idempotent rer...

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

Implement an LRU cache with O(1) ops

Design and code an LRU cache supporting get(key) and put(key, value) in O(1) average time with capacity N. Specify your data structures, handle update...

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

Write SQL filtering, grouping, CASE, UNION tasks

Use the following schema and sample data to answer all parts. Assume standard ANSI SQL and that amounts are DECIMAL. Table: orders +----------+-------...

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

Diagnose MySQL joins and GROUP BY/HAVING errors

You are using MySQL 8.0 with ONLY_FULL_GROUP_BY enabled. Answer all parts precisely. Provide the exact SQL you would run and the final result shapes/v...

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

Query and transform marketplace data in SQL/Python

Assume today is 2025-09-01. Use the following schema and sample data to answer the questions with both SQL (preferred) and equivalent Python (pandas) ...

Data Manipulation (SQL/Python)
0
0
4 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
9 people solved
Oct 13, 2025
Point72 logo
Point72
Medium
Data Scientist

Classify relationships for multiple circle pairs

Given an array pairs of N circle pairs, where each circle is (x, y, r) with integer coordinates and r ≥ 0, classify each pair into one of: IDENTICAL (...

Coding & Algorithms
6
0
61 people solved
Oct 13, 2025
Point72 logo
Point72
Medium
Data Scientist

Maximize outfits with distinct colors

You're given counts of items by color; each outfit must contain exactly 3 items, all of distinct colors. You cannot reuse items. Input formats: either...

Coding & Algorithms
4
0
57 people solved
Oct 13, 2025
Point72 logo
Point72
Medium
Data Scientist

Convert integer dates to quarters

Given an 8-digit integer date_key in YYYYMMDD (e.g., 20240331), write: (a) a SQL expression and (b) a Python function that convert it to a quarter lab...

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

Write SQL for deliveries analytics

Write SQL for the following analytics tasks. Assume a PostgreSQL-like dialect unless otherwise stated. Treat "today" as 2025-09-01. Schema: - users(us...

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