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

Find first error and propagate failures

You are given a chronological log history where each entry is a string prefixed with one of [Info], [Warn], or [Error]. Two invariants hold: ( 1) once...

Coding & Algorithms
1
0
13 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find returning users from access logs

Given a large user access log, parse it and identify which user_ids are returning customers—i.e., they have at least one visit on two or more distinct...

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

Debug a Hive query

You are given a prewritten Hive SQL query that produces incorrect results. Describe how you would debug it: identify logical errors (e.g., join condit...

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

Compute currency conversions with graph algorithms

Question You are given a set of pairwise currency exchange relations such as A:B = 1:1.5 and B:C = 1:1.5, meaning 1 A = 1.5 B and 1 B = 1.5 C. Design ...

Coding & Algorithms
3
0
30 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find longest segment with endpoints > interior

Given an integer array nums, find the length of the longest contiguous segment [i..j] (j−i+1 ≥ 2) such that both endpoints are strictly greater than e...

Coding & Algorithms
2
0
23 people solved
Sep 6, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Implement top-K over a stream

Given a high-volume stream of events (e.g., account IDs from new account openings), design and implement a data structure that supports: ( 1) insertin...

Coding & Algorithms
16
0
116 people solved
Sep 6, 2025
Tesla logo
Tesla
Medium
Machine Learning Engineer

Implement and vectorize NumPy Conv2D

Implement a 2D convolution operation from scratch using NumPy only (no TensorFlow or PyTorch). Assume NCHW input shape (N, C_in, H_in, W_in) and weigh...

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

Fill rooms with nearest gate distances

You are given an m×n integer grid representing rooms, where -1 is a wall, 0 is a gate, and INF (a large sentinel such as 2^31− 1) is an empty room. Fo...

Coding & Algorithms
1
0
26 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Compute build order from dependencies

Given a set of package build dependencies, output a valid build order so that each package is built only after all of its dependencies. The input is a...

Coding & Algorithms
10
0
74 people solved
Sep 6, 2025
Google logo
Google
Medium
Software Engineer

Find horizontal cut balancing square areas

Given a 2D table with top-left origin (0, 0), you are provided a finite set of n non-overlapping, axis-aligned square cakes. Each square i has real-va...

Coding & Algorithms
3
0
43 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Implement exponentiation and link tree neighbors

Solve two independent tasks. Task A — Fast exponentiation: Implement fastExponent(x, n) that returns x raised to the integer power n, where x is a dou...

Coding & Algorithms
3
0
40 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
Meta logo
Meta
Medium
Machine Learning Engineer

Find connected region sizes in matrix

Given an m x n grid of characters grid and a target character ch, implement: ( 1) sizeOfRegion(grid, r0, c0, ch) -> int that returns the size of the 4...

Coding & Algorithms
5
0
57 people solved
Sep 6, 2025
Rippling logo
Rippling
Medium
Software Engineer

Compute maximum simultaneous drivers

Given N driver online intervals [start_time, end_time) during a day, compute the maximum number of drivers simultaneously online at any moment. Handle...

Coding & Algorithms
11
0
140 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Implement file deduplication at scale

Implement a command-line tool to find duplicate files in a directory tree. Use OS/pathlib primitives to recursively enumerate files. Apply prefilters ...

Coding & Algorithms
18
0
152 people solved
Sep 6, 2025
Atlassian logo
Atlassian
Medium
Software Engineer

Implement snake game and find org LCA

Part A — Snake Game Engine: Implement a grid-based snake game. The board has height H and width W (0-indexed, row-major). The snake starts at (0, 0) m...

Coding & Algorithms
5
0
67 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Compute exclusive times and call stack from logs

Design an algorithm that, given a single-threaded program's execution log, computes per-function exclusive durations and reconstructs the active call ...

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

Compute max profit across dated stock quotes

You are given an unsorted list of price records for multiple stocks, each record as (date, symbol, price). Dates may be repeated across different symb...

Coding & Algorithms
17
0
132 people solved
Sep 6, 2025
HubSpot logo
HubSpot
Medium
Software Engineer

Implement Python LRU cache with varargs

Implement an LRU cache in Python as a decorator cache(maxsize) that memoizes a target function's results. Must support positional args, args, and *kwa...

Coding & Algorithms
14
0
122 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Simulate one-round color elimination on a grid

Given an m x n integer matrix board where board[r][c] > 0 represents a color and 0 represents empty: ( 1) A nonzero cell at (r,c) explodes in this rou...

Coding & Algorithms
11
0
77 people solved
Sep 6, 2025