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

Implement binary tree in-order traversal

Given the root of a binary tree, return the in-order ordering of its node values. Implement both a recursive solution and an iterative solution using ...

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

Determine and print expression to reach target

You are given four numbers and a target T (e.g., 24). Using +, −, ×, ÷ and parentheses, and using each number exactly once, determine whether you can ...

Coding & Algorithms
4
0
43 people solved
Sep 6, 2025
Citadel logo
Citadel
Medium
Software Engineer

Find earliest common meeting slot

Given K participants' calendars, each a list of busy intervals [start, end) within a working window [workStart, workEnd], and a meeting duration d min...

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

Debug using logs and allocate tasks

You inherit a service where unit tests pass locally, but production logs show intermittent errors. Without a debugger, outline a step-by-step debuggin...

Coding & Algorithms
18
0
199 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Design dynamic connectivity with alive nodes

Design a data structure to maintain an undirected graph of N nodes, where each node has a boolean 'alive' flag. Support the following operations effic...

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

Implement and compare round-robin and consistent hashing

Implement a round-robin load balancer that selects among service nodes, skipping unavailable nodes and wrapping around correctly. Fix typical pitfalls...

Coding & Algorithms
11
0
178 people solved
Sep 6, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Design mutable sum-tree with fast queries

You're given a rooted, mutable tree. Each leaf node stores an integer value. Each internal node's value equals the sum of its immediate children's val...

Coding & Algorithms
21
0
183 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Find leftmost point of maximum brightness

You are given an array of lights, where each light is [p, r] representing a lamp centered at coordinate p on the real number line with radius r, illum...

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

Count palindrome substrings in a string

Given a lowercase ASCII string s, count the number of substrings that are palindromes and return the count. Implement an O(n^ 2) solution using expand...

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

Design and implement a Python solution

Design and implement a solution in Python for a problem specified by the interviewer. Outline your approach and chosen data structures, justify key de...

Coding & Algorithms
26
0
243 people solved
Sep 6, 2025
Walmart Labs logo
Walmart Labs
Medium
Software Engineer

Compute maximum simultaneous bus routes

You are given N bus routes, each defined by a start time (inclusive) and an end time (exclusive). Compute the maximum number of routes running simulta...

Coding & Algorithms
4
0
34 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
133 people solved
Sep 6, 2025