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

Optimize C++ Performance with Provided Concurrency

Given a C++ codebase where threading components (threads, work queues, and synchronization primitives) are already provided, profile and optimize the ...

Coding & Algorithms
10
0
167 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute Differences Between Catalog Trees

You are given two rooted catalog trees. Each node has a unique string key among its siblings and an associated value. Compare the two trees and return...

Coding & Algorithms
13
0
107 people solved
Sep 6, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Implement KV store and plan type conversions

Part 1 — Versioned key-value store: Implement a data structure with set(key, value, t) and get_at(key, t) that returns the value for key whose timesta...

Coding & Algorithms
48
0
371 people solved
Sep 6, 2025
Rippling logo
Rippling
Medium
Software Engineer

Compute peak concurrent drivers in 24 hours

Given delivery intervals across multiple drivers, compute the maximum number of distinct drivers simultaneously active within the last 24 hours from a...

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

Heapify an array into a max-heap

Given the array [6, 15, 2, 4, 3, 8, 19], apply heapify to build a max-heap using the standard in-place bottom-up method with a 0-indexed array represe...

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

Break a palindrome to smallest non-palindrome

Given a palindromic string s of lowercase English letters, change exactly one character to obtain a new string that is not a palindrome and is lexicog...

Coding & Algorithms
1
0
30 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Compute max profit from single stock trade

Given an array prices where prices[i] is the stock price on day i, compute the maximum profit achievable with at most one transaction (one buy and one...

Coding & Algorithms
1
0
23 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Design a single-machine LRU cache

Design an in-memory LRU cache for a single machine using a hash map and a doubly linked list to support O( 1) get and put. Explain how you handle capa...

Coding & Algorithms
9
0
76 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Merge overlapping and adjacent ranges

Given an unsorted list of integer ranges represented as half-open intervals [start, end) with start < end, merge all overlapping or directly adjacent ...

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

Design a fixed-capacity circular queue

Design a fixed-capacity circular queue that supports enqueue(x), dequeue(), front(), rear(), isEmpty(), and isFull() operations in O( 1) time. Impleme...

Coding & Algorithms
1
0
28 people solved
Sep 6, 2025
Lyft logo
Lyft
Medium
Software Engineer

Solve grid compromise spread with BFS

You are given an m×n grid representing a data center: 0 = empty rack, 1 = secure server, 2 = compromised server. Each minute, any secure server that i...

Coding & Algorithms
12
0
89 people solved
Sep 6, 2025
Snowflake logo
Snowflake
Medium
Software Engineer

Transform tree using counterpart subtree sums

Given the roots of two complete binary trees with identical structure, modify the node values of the second tree so that each node equals the sum of a...

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

Implement ordering with dependency constraints

You are given n items labeled 0..n−1 and a list of precedence constraints edges[i] = [u, v] meaning u must appear before v. Return a valid ordering of...

Coding & Algorithms
12
0
97 people solved
Sep 6, 2025
Lyft logo
Lyft
Medium
Software Engineer

Implement pagination and a time-versioned key-value store

Implement two coding tasks: 1) Transaction pagination: Given an in-memory collection of transaction records with fields (txn_id: string, user_id: stri...

Coding & Algorithms
7
0
115 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Optimize flight costs and find grid path

1) Given two integer arrays D and R of equal length n, where D[i] is the cost to depart on day i and R[j] is the cost to return on day j, choose indic...

Coding & Algorithms
4
0
31 people solved
Sep 6, 2025
Databricks logo
Databricks
Medium
Software Engineer

Design IP/CIDR rule matcher

Design and implement a rule matcher that returns 'accept' or 'deny' for a given IPv4 address based on a set of rules. Each rule can be either an inclu...

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

Find earliest common meeting slot

Question Given the calendars of N attendees, find the earliest time window of length at least d minutes during which all attendees are simultaneously ...

Coding & Algorithms
11
0
82 people solved
Sep 6, 2025
Cerebras logo
Cerebras
Medium
Software Engineer

Implement Binary Search in C++

From scratch in C++, implement binary search over a sorted array to locate a target value. Provide a correct iterative implementation, handle not-foun...

Coding & Algorithms
7
0
73 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Solve vault rate and subset-sum

1) Robber vaults rate: You are given an array vaults of positive integers where vaults[i] is the amount in the i-th vault, and an integer h (hours). I...

Coding & Algorithms
7
0
65 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Design faster delay-time computation

You are given an array of integers representing task priorities. Tasks execute from right to left. For each index i, define its delay time as j - i wh...

Coding & Algorithms
2
0
34 people solved
Sep 6, 2025