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

Detect currency arbitrage with costs

You are given a K×K matrix R of currency exchange rates where R[i][j] is the amount of currency j obtainable for one unit of currency i, and R[i][i] =...

Coding & Algorithms
36
0
261 people solved
Jul 16, 2025
Meta logo
Meta
Medium
Software Engineer

Implement range-sum tree and sort merged lists

Implement range-sum tree and sort merged lists 1) Given a binary tree whose nodes store integer values, and two integers low and high defining an incl...

Coding & Algorithms
4
0
38 people solved
Jul 16, 2025
Morgan Stanley logo
Morgan Stanley
Medium
Software Engineer

Compute minimal cost to merge numbers

Compute minimal cost to merge numbers Given an array of positive integers, you may repeatedly perform the following operation until one number remains...

Coding & Algorithms
4
0
41 people solved
Jul 16, 2025
Meta logo
Meta
Medium
Data Engineer

Write SQL for library analytics

Given a library database, write SQL to answer the following: 1) Count the number of books that are currently not returned (i.e., still checked out) an...

Data Manipulation (SQL/Python)
1
0
14 people solved
Jul 16, 2025
Citadel logo
Citadel
Medium
Software Engineer

Solve two DS&A optimization problems

Problem 1 — Maximize alternating-sum over four array partitions: Given an integer array arr[1..n] (1-based). Choose indices a, b, c with 1 ≤ a ≤ b ≤ c...

Coding & Algorithms
8
0
130 people solved
Jul 16, 2025
Amazon logo
Amazon
Medium
Software Engineer

Describe achievements, ambiguity, conflict, efficiency, challenges

Describe achievements, ambiguity, conflict, efficiency, challenges Behavioral Technical Screen — Multi-part Prompt Context: You are interviewing for a...

Behavioral & Leadership
2
0
30 people solved
Jul 16, 2025
Amazon logo
Amazon
Medium
Software Engineer

Brainstorm a business problem approach

Brainstorm a business problem approach Analytics & Experimentation Brainstorm (Scenario Provided) Context You are evaluating a feature proposal for a ...

Analytics & Experimentation
4
0
42 people solved
Jul 15, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Debug and refactor a legacy module

Given a legacy module named DasherPicker and a failing test suite, systematically debug and refactor the code while following a provided review checkl...

Coding & Algorithms
40
0
310 people solved
Jul 15, 2025
Apple logo
Apple
Medium
Data Scientist

Implement sparse vector dot product and cosine similarity

Sparse Vector Class Implement a SparseVector class for high-dimensional vectors where most entries are zero. Representation Assume each vector has: - ...

Coding & Algorithms
6
0
56 people solved
Jul 15, 2025
Meta logo
Meta
Medium
Software Engineer

Evaluate arithmetic expression without parentheses

Evaluate arithmetic expression without parentheses Write evaluate(s: string) to compute the value of an arithmetic expression containing non-negative ...

Coding & Algorithms
3
0
38 people solved
Jul 15, 2025
Palantir logo
Palantir
Medium
Software Engineer

Group employees by shared interests

Given N employees, each with an integer id and a set of interests (strings), write an algorithm to find all employees who share at least one common in...

Coding & Algorithms
17
0
185 people solved
Jul 15, 2025
Amazon logo
Amazon
Medium
Software Engineer

Design 2D DP on a DAG

Design 2D DP on a DAG Given a directed acyclic graph G(V, E) with N nodes, M edges, a designated source s, and an integer L, design a 2D dynamic progr...

Coding & Algorithms
6
0
54 people solved
Jul 15, 2025
Meta logo
Meta
Medium
Data Engineer

Write SQL and Python for data prep

Given clickstream events (user_id, event_type, ts, properties) and a users table (user_id, signup_ts, plan), write SQL to compute DAU/WAU/MAU, D1/W1 r...

Data Manipulation (SQL/Python)
1
1
8 people solved
Jul 15, 2025
Meta logo
Meta
Medium
Software Engineer

Implement weighted random index picker

Implement weighted random index picker Design a class WeightedPicker that is initialized with an array of positive integer weights w and supports pick...

Coding & Algorithms
2
0
24 people solved
Jul 15, 2025
TikTok logo
TikTok
Medium
Software Engineer

Reconstruct a tree from two traversals

Reconstruct a tree from two traversals Given two arrays representing the preorder and inorder traversals of a binary tree with unique values, reconstr...

Coding & Algorithms
4
0
45 people solved
Jul 15, 2025
Google logo
Google
Medium
Software Engineer

Decide string transform with directional tokens and walls

Decide string transform with directional tokens and walls You are given two equal-length strings start and target of length n, each consisting only of...

Coding & Algorithms
4
0
59 people solved
Jul 15, 2025
Meta logo
Meta
Medium
Software Engineer

Maximize number with one digit swap

Maximize number with one digit swap Given a non-negative integer n (as an int or string), perform at most one swap of two digits to produce the maximu...

Coding & Algorithms
2
0
30 people solved
Jul 15, 2025
Affirm logo
Affirm
Medium
Software Engineer

Implement and debug event filtering in Python

You are given a list of event dictionaries with keys: id (str), type (str), ts (int, seconds since epoch), payload (dict). Implement filter_events(eve...

Data Manipulation (SQL/Python)
1
0
5 people solved
Jul 15, 2025
Uber logo
Uber
Medium
Software Engineer

Implement uniform sampling in squares

Implement uniform sampling in squares Implement a class Square representing an axis-aligned square on the 2D plane that supports sampling a uniformly ...

Coding & Algorithms
6
0
75 people solved
Jul 15, 2025
SoFi logo
SoFi
Medium
Software Engineer

Design a key-value store with getLast

Design a key-value store with getLast Design and implement an in-memory key–value store with this API: add(key, value), get(key), remove(key), and get...

Coding & Algorithms
11
0
82 people solved
Jul 15, 2025