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 480 Companies08.05.2026
Showing 20 results
Role
Easy
Data ScientistIntern

Find two numbers that sum to target

Problem You are given an integer array nums (length n) and an integer target. Return the indices (i, j) such that: - i != j - nums[i] + nums[j] == tar...

Coding & Algorithms
4
0
35 people solved
Sep 28, 2025
Zillow logo
Zillow
Medium
Machine Learning Engineer

Implement k-th largest in a number stream

You are designing a small library to monitor statistics over a stream of integers. Implement a data structure that, given an integer k and an initial ...

Coding & Algorithms
2
0
29 people solved
Sep 24, 2025
xAI logo
xAI
Medium
Software Engineer

Token Bucket Rate Limiter with Lazy Refill Backed by a Cache

Token Bucket Rate Limiter with Lazy Refill Backed by a Cache You are building the enforcement layer of a rate limiter. Every user has a token bucket s...

Coding & Algorithms
1
1
13 people solved
Sep 23, 2025
Capital One logo
Capital One
Medium
Software Engineer

Count ordered pairs that concatenate to target

Given a list of integers numbers and an integer target, count the number of ordered pairs (i, j) with i != j such that concatenating numbers[i] follow...

Coding & Algorithms
15
0
109 people solved
Sep 19, 2025
Two Sigma logo
Two Sigma
Medium
Software Engineer

Autoscale a Server Fleet from Throughput Readings

You run a service on a fleet of identical servers behind a load balancer. Each server can handle at most limit units of throughput. A monitoring syste...

Coding & Algorithms
0
0
5 people solved
Sep 19, 2025
Two Sigma logo
Two Sigma
Medium
Software Engineer

All Subsequences After Deleting One Character

You are given a string s of length n consisting of lowercase English letters. Consider every string that can be obtained by deleting exactly one chara...

Coding & Algorithms
0
0
7 people solved
Sep 19, 2025
Disney logo
Disney
Medium
Data Scientist

Solve matrix add, frequency count, longest consecutive

You are asked to solve the following 3 coding tasks (in any language). Implement each as a function. 1) Add two matrices Input: Two 2D integer arrays ...

Coding & Algorithms
6
0
43 people solved
Sep 13, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Generate Weighted Random NFTs with Updates

You manage k NFT types, each with a positive integer rarity weight w[i]. Implement a minter: constructor(w) builds any needed structures in O(k); mint...

Coding & Algorithms
21
0
199 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
22 people solved
Sep 6, 2025
Citadel logo
Citadel
Medium
Software Engineer

Solve four algorithmic problems

Answer the following independent algorithmic questions: 1) Count extendable prefixes for '10' subsequences: Given a binary string s and an integer k, ...

Coding & Algorithms
21
0
204 people solved
Sep 6, 2025
MathWorks logo
MathWorks
Medium
Software Engineer

Decide transform via one-to-one mapping

You are given two strings s and t of equal length over the lowercase English alphabet. In one step, you may pick any character x and replace all its o...

Coding & Algorithms
10
0
68 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
22 people solved
Sep 6, 2025
UiPath logo
UiPath
Medium
Software Engineer

Compute longest distinct substring, case-insensitive

Given a string s, return the length of the longest contiguous substring that contains no repeated characters, treating letters case-insensitively (e.g...

Coding & Algorithms
6
0
46 people solved
Sep 6, 2025
Stripe logo
Stripe
Medium
Software Engineer

Design payment-to-invoice matcher with priorities

Design and implement a payment-to-invoice matcher. Inputs: (a) invoices, a list like ["invoice-id-1, 10000, 2022-01-01", "invoice-id-2, 30000, 2022-01...

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

Count regions with DFS

Given an m x n grid of 0s and 1s, count the number of connected regions consisting of 1s using depth-first search (4-directional adjacency). Return th...

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

Design error detection and propagation algorithms

You are given three related sub-problems about error detection and propagation. A) Log search: You have a chronologically ordered array of log lines. ...

Coding & Algorithms
4
0
32 people solved
Sep 6, 2025
Optiver logo
Optiver
Medium
Data Scientist

Solve a Skyscraper puzzle efficiently

Design and implement a solver for the Skyscraper logic puzzle on an $N \times N$ grid, where $3 \le N \le 7$. The board is a grid of building heights....

Coding & Algorithms
47
0
329 people solved
Sep 6, 2025
Google logo
Google
Medium
Software Engineer

Find horizontal cut balancing square areas

Given a 2D table with top-left origin (0, 0), you are provided a finite set of n non-overlapping, axis-aligned square cakes. Each square i has real-va...

Coding & Algorithms
3
0
43 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Reverse between equal-value nodes in list

Given the head of a singly linked list and a target value v, locate the first two nodes whose values equal v (call them A and B, with A before B) and ...

Coding & Algorithms
3
0
36 people solved
Sep 6, 2025