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
Datadog logo
Datadog
Medium
Software Engineer

Implement write with internal buffer

Implement a buffered writer over an expensive sink API. You are given a function writeToDevice(byte[] chunk) that may accept at most M bytes per call ...

Coding & Algorithms
0
0
8 people solved
Sep 6, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Compute most popular location with weights

You are given a dataset of voting records for concert locations. Each record includes voter_id, location_text, and an optional numeric weight (default...

Data Manipulation (SQL/Python)
0
0
7 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Design high-throughput hashing for kernels

Design a high-throughput hash-based lookup to be called inside a tight kernel. Choose between open addressing and chaining, specify the load factor, p...

Coding & Algorithms
17
0
179 people solved
Sep 6, 2025
PayPal logo
PayPal
Medium
Machine Learning Engineer

Maximize ones with limited flips

Given a binary array and an integer k, return the length of the longest contiguous subarray achievable by flipping at most k zeros to ones. Explain an...

Coding & Algorithms
3
0
45 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Design an in-memory database with TTL and history

Design and implement an in-memory key–field–value store with monotonic timestamps. Keys and fields are strings; values are integers. Provide these API...

Coding & Algorithms
9
0
100 people solved
Sep 6, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Solve load balancing and perfect pairs

1) Contiguous load balancing: You have n identical resources (servers) and m ordered tasks with processing times burstTime[0..m-1]. Each server must b...

Coding & Algorithms
10
0
72 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find all pairs summing to target in sorted array

Given a non-decreasing array of integers nums and an integer target, return all unique pairs of indices (i, j) with i < j such that nums[i] + nums[j] ...

Coding & Algorithms
6
0
45 people solved
Sep 6, 2025
Bilt Rewards logo
Bilt Rewards
Medium
Software Engineer

Write SQL to Join Merchants and Triple Restaurant Points

You are given: ( 1) a CSV file merchants.csv with columns: merchant_name, merchant_code, category; ( 2) a database table transactions(user_id INT, mer...

Data Manipulation (SQL/Python)
0
0
5 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Implement a recency-eviction bounded cache

Implement an in-memory key–value store with a fixed capacity N that uses recency-based eviction. Support: get(key) -> value or -1 if missing, and put(...

Coding & Algorithms
16
0
211 people solved
Sep 6, 2025
Capital One logo
Capital One
Medium
Machine Learning Engineer

Rotate matrix and find max lamp coverage

1) Square-matrix rotation with extra space: Given an n x n integer matrix, return a new matrix that is the 90-degree clockwise rotation of the input. ...

Coding & Algorithms
12
0
79 people solved
Sep 6, 2025
Instacart logo
Instacart
Medium
Software Engineer

Pivot transactions by date without date libs

Given a stream of transaction rows (shopper_id, date_str, amount) where date_str is ISO format 'YYYY-MM-DD', produce a pivoted report for a specified ...

Data Manipulation (SQL/Python)
0
0
8 people solved
Sep 6, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Maximize profit with transaction fees

You are given an array prices where prices[i] is the price of a stock on day i and an integer fee representing the commission charged when you sell. Y...

Coding & Algorithms
14
0
97 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Compute top-N active customers

Maintain and return the top N customers by cumulative activity amount, where activity is defined as the sum of deposit amounts, pay amounts, and trans...

Coding & Algorithms
5
0
40 people solved
Sep 6, 2025
Samsung logo
Samsung
Medium
Machine Learning Engineer

Validate palindrome with constraints

Given a string s, return true if s reads the same forward and backward after removing all non-alphanumeric characters and ignoring letter case. Implem...

Coding & Algorithms
4
0
33 people solved
Sep 6, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Design Manhattan-distance meeting point finder

Given an m×n grid with cells marked 1 for homes and 0 otherwise, choose a single meeting cell that minimizes the sum of Manhattan distances from all h...

Coding & Algorithms
5
0
49 people solved
Sep 6, 2025
Apple logo
Apple
Medium
Software Engineer

Design a rolling five-minute hit counter

Design an in-memory hit counter that supports: ( 1) recordHit(timestamp) to log an event, and ( 2) getCountLast5Minutes(now) to return the number of e...

Coding & Algorithms
5
0
74 people solved
Sep 6, 2025
WeRide logo
WeRide
Medium
Software Engineer

Implement expression expansion to plus-only form

Given a string expression consisting only of lowercase letters (variables), '+', '*', '(', and ')', return an equivalent expression that uses only '+'...

Coding & Algorithms
2
0
44 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find minimum time for irrecoverable password

A password is a string s of length n. A virus attacks positions in a 1-indexed order given by a permutation attackOrder[1..n]. At second t (1 <= t <= ...

Coding & Algorithms
1
0
22 people solved
Sep 6, 2025
Akuna Capital logo
Akuna Capital
Medium
Software Engineer

Evaluate SQL expressions for zero

Which of the following SQL expressions evaluate to 0? Evaluate each independently, justify the result, and note any dialect-specific behavior (e.g., M...

Data Manipulation (SQL/Python)
0
0
5 people solved
Sep 6, 2025
XPeng logo
XPeng
Medium
Machine Learning Engineer

Compute optimal matrix multiplication order

Given an array dims[0..n] where matrix i has dimensions dims[i-1] × dims[i] (for i = 1..n), compute the minimum number of scalar multiplications neede...

Coding & Algorithms
1
0
12 people solved
Sep 6, 2025