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 486 Companies08.11.2026
Showing 20 results
Role
Airbnb logo
Airbnb
Medium
Software Engineer

Solve and optimize menu combo DP

Given up to N different menu items, each with a unit price, and a list of combo offers where each offer specifies quantities for some items and a tota...

Coding & Algorithms
5
0
24 people solved
Sep 6, 2025
TripStack logo
TripStack
Medium
Software Engineer

Compute minimum resources for overlapping intervals

You are given n tasks as half-open time intervals [start, end) on a single day. Determine the minimum number of identical servers needed so that no tw...

Coding & Algorithms
1
0
7 people solved
Sep 6, 2025
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
14 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute dasher payout from API data

Given a REST endpoint GET /payout that returns each delivery’s components (base pay, distance/time bonuses, promotions, tips, fees, adjustments, taxes...

Data Manipulation (SQL/Python)
0
0
6 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
3 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Find substring where all chars appear at least k

You are given a string s and an integer k (1 ≤ k ≤ |s|). Return the length of the longest substring in which every distinct character occurs at least ...

Coding & Algorithms
3
0
44 people solved
Sep 6, 2025
Rippling logo
Rippling
Medium
Software Engineer

Design a music player with favorites cap

Implement an in-memory music player that supports: addSong(id, metadata), removeSong(id), play(id), pause(), next(), prev(), getNowPlaying(), queueSon...

Coding & Algorithms
25
0
198 people solved
Sep 6, 2025
Snowflake logo
Snowflake
Medium
Software Engineer

Solve build ordering and expression evaluation

Part A — Dependency ordering: You are given an integer n (0 ≤ n ≤ 200000) representing tasks labeled 0..n-1 and a list of prerequisite pairs [a, b] me...

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

Design file deduplication algorithm

Design an algorithm to deduplicate files in a storage system. Compare fixed-size versus content-defined chunking and explain how you would choose hash...

Coding & Algorithms
12
0
201 people solved
Sep 6, 2025
Databricks logo
Databricks
Medium
Software Engineer

Implement a sliding-window hit counter

Implement a hit counter that supports recordHit(timestamp) and getHits(pastSeconds). Use a fixed-size array to maintain a sliding time window (e.g., l...

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

Implement bounds, minimum, pathfinding, and moving average

Solve the following data-structures problems: ( 1) Given two sorted integer lists A and B, merge them into a single non-decreasing array. Then, for a ...

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

Implement DFS for connected components

Given an undirected graph with n nodes (1 ≤ n ≤ 200, 000) and an edge list, implement depth-first search to compute (a) the number of connected compon...

Coding & Algorithms
9
0
60 people solved
Sep 6, 2025
Mixpanel logo
Mixpanel
Medium
Software Engineer

Implement precise string-based decimal addition

Given two non-empty strings representing decimal numbers (e.g., "123.456" and "6234.42432"), implement a function that returns their exact sum as a st...

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

Apply bitwise tricks for performance

For an integer-heavy inner loop, propose bit-level optimizations that reduce branches and memory traffic: e.g., population count usage, fast modulo by...

Coding & Algorithms
22
0
162 people solved
Sep 6, 2025
Citi logo
Citi
Medium
Software Engineer

Implement bidirectional Dijkstra for shortest paths

Given a directed or undirected graph with non‑negative edge weights, design and implement bidirectional Dijkstra (“double Dijkstra”) to find the short...

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

Merge two sorted arrays in-place

You are given two nondecreasing arrays A and B, where A has enough trailing empty slots to hold all elements of B. Merge B into A in-place so that A r...

Coding & Algorithms
5
0
51 people solved
Sep 6, 2025
Upstart logo
Upstart
Medium
Software Engineer

Find max word letter span

Implement a function that, given an input text string, computes the maximum word letter span and returns both (a) the maximum span and (b) the list of...

Coding & Algorithms
22
0
203 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Find next and closest palindromes

Given a non-negative integer represented as a string n (no leading zeros unless n == "0"), return the smallest palindromic integer strictly greater th...

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

Compute minimum required meeting rooms

Given a list of meeting time intervals [start, end) for many events, determine the minimum number of rooms required so no meetings overlap in the same...

Coding & Algorithms
6
0
62 people solved
Sep 6, 2025
Disney logo
Disney
Medium
Software Engineer

Solve grid shortest path with BFS

Given a 2D grid containing 0s (open cells) and 1s (walls), and coordinates for a start (sr, sc) and a target (tr, tc), return the length of the shorte...

Coding & Algorithms
5
0
51 people solved
Sep 6, 2025