Tech Interview Questions

Practice 9,555+ interview questions from top companies including Google, Meta, Amazon, and more. Filter by company, role, and category.

Popular Interview Questions

Interview Questions

Practice the exact questions companies are asking right now.

9.6k Questions 505 Companies08.05.2026
Showing 20 results
Role
Meta logo
Meta
Medium
Software Engineer

Compute product of array except self

Given an integer array nums, return an array out where out[i] equals the product of all elements in nums except nums[i]. Do it in O(n) time using cons...

Coding & Algorithms
2
0
22 people solved
Jul 29, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Implement bank account with cashback

Implement a bank account processor. Given an initial non-negative integer balance B and a list of operations (n up to 1e 5), apply each operation in o...

Coding & Algorithms
3
0
56 people solved
Jul 29, 2025
TikTok logo
TikTok
Medium
Software Engineer

Format messages with paginated suffixes

You are given a message string s and an integer width w. Split s into multiple chunks, preserving character order, and append a suffix "i/n" to each c...

Coding & Algorithms
5
0
39 people solved
Jul 29, 2025
NVIDIA logo
NVIDIA
Medium
Software Engineer

Reconstruct tree from inorder and postorder

Given two arrays representing the inorder and postorder traversals of a binary tree with unique values, reconstruct the original binary tree and retur...

Coding & Algorithms
7
0
56 people solved
Jul 29, 2025
TikTok logo
TikTok
Medium
Software Engineer

Implement a match-3 board resolver

Question Implement a match-3 board resolver (the core loop of a "candy crush"-style game). You are given an m×n grid of cells. Each cell holds a value...

Coding & Algorithms
3
0
41 people solved
Jul 29, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Detect runs and answer suffix queries

Given an array of comparable elements a[0..m-1] and an integer N: 1) Write a function that returns the maximum length of any run of consecutive equal ...

Coding & Algorithms
18
0
250 people solved
Jul 28, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Find max distance between alive tree nodes

Find max distance between alive tree nodes Given a binary tree, define alive nodes. Base case: alive nodes are the leaves. Find the maximum distance (...

Coding & Algorithms
7
0
57 people solved
Jul 28, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Design a hierarchical path registry

Design a hierarchical path registry Implement an in-memory hierarchical path registry. Support: create(path, value) to create a new path with an integ...

Coding & Algorithms
4
0
52 people solved
Jul 28, 2025
Meta logo
Meta
Medium
Data Scientist

Find posts with >60s unconnected viewing time

Context You work on a social app where users can view posts. A view can be from a connected user (viewer is friends/connected with the post author) or...

Data Manipulation (SQL/Python)
3
1
58 people solved
Jul 28, 2025
Salesforce logo
Salesforce
Medium
Software Engineer

Deduplicate a Linked List

Given a singly linked list, remove duplicate values in-place. Variant A (sorted list): delete repeated nodes so each value appears once using O( 1) ex...

Coding & Algorithms
3
0
40 people solved
Jul 28, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Discuss project experience and teamwork

Discuss project experience and teamwork Behavioral & Leadership: Project Experience and Teamwork (Software Engineer, Onsite) Context: Provide concise,...

Behavioral & Leadership
3
0
57 people solved
Jul 28, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute nearest-exit distances in a grid

Compute nearest-exit distances in a grid You are given a 2D grid representing a building floor with three cell types: -1 for walls, 0 for exits, and a...

Coding & Algorithms
5
0
66 people solved
Jul 28, 2025
Anthropic logo
Anthropic
Medium
Machine Learning Engineer

Implement cluster status tracker

Implement a cluster status tracker. Design a class with methods: update(nodeId, status, timestamp) to record node status updates that may arrive out o...

Coding & Algorithms
19
0
259 people solved
Jul 27, 2025
Confluent logo
Confluent
Medium
Software Engineer

Solve constrained monster traversal

Solve constrained monster traversal You are given a directed graph with n rooms labeled 0..n-1; each room i contains a monster with health hp[i] ≥ 0. ...

Coding & Algorithms
7
0
116 people solved
Jul 27, 2025
Citadel logo
Citadel
Medium
Data Scientist

Implement two-pointer unique-pair sum search

Implement two-pointer unique-pair sum search Given a nondecreasing integer array nums and an integer target, return all unique value pairs [a, b] with...

Coding & Algorithms
8
0
82 people solved
Jul 27, 2025
Meta logo
Meta
Medium
Software Engineer

Evaluate expression without stack, constant space

Evaluate expression without stack, constant space Given a string s representing a valid arithmetic expression of non-negative integers, the operators ...

Coding & Algorithms
2
0
38 people solved
Jul 27, 2025
Meta logo
Meta
Medium
Software Engineer

Find k most frequent elements, discuss O(n)

Find k most frequent elements, discuss O(n) Given an integer array nums of length n and an integer k (where 1 ≤ k ≤ the number of distinct values in n...

Coding & Algorithms
4
0
33 people solved
Jul 27, 2025
Meta logo
Meta
Medium
Software Engineer

Compute longest increasing path in a matrix

Compute longest increasing path in a matrix Given an m × n integer matrix, return the length of the longest path of strictly increasing values, where ...

Coding & Algorithms
1
0
26 people solved
Jul 27, 2025
Harvey logo
Harvey
Medium
Software Engineer

Design a constrained in-memory file system

Design an in-memory hierarchical file system. Implement: 1) addFile(String path): Given a UNIX-style absolute path like "/path/to/somewhere/file.txt",...

Coding & Algorithms
22
0
325 people solved
Jul 27, 2025
Meta logo
Meta
Medium
Software Engineer

Traverse levels selecting nodes meeting a predicate

Traverse levels selecting nodes meeting a predicate Given the root of a binary tree and a predicate P(value) that returns true for certain node values...

Coding & Algorithms
2
0
17 people solved
Jul 27, 2025