Tech Interview Questions

Practice 9,160+ 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.2k Questions 486 Companies08.11.2026
Showing 20 results
Role
Google logo
Google
Hard
Software Engineer

Compute city skyline outline

You are given a list of rectangular buildings in a 2D city skyline. Each building is represented by three integers [L, R, H]: - L: the x-coordinate of...

Coding & Algorithms
14
0
132 people solved
Dec 8, 2025
Squarepoint logo
Squarepoint
Medium
Data Scientist

Maximize revenue from inventory sales

Problem A store has n different products. For each product i (0-indexed), you are given an integer quantity[i] representing how many units of that pro...

Coding & Algorithms
6
0
64 people solved
Dec 8, 2025
Applied logo
Applied
Hard
Software Engineer

Track simulations and report timeouts

You are implementing a monitoring component for many concurrent simulations. Each simulation produces a stream of event objects of the form: - sim_id ...

Coding & Algorithms
2
0
28 people solved
Dec 8, 2025
Netflix logo
Netflix
Medium
Software Engineer

Find user pairs with overlapping last K movies

You are given the same user movie-watching histories as in the previous problem. Each user’s history is an ordered list of movie IDs from earliest to ...

Coding & Algorithms
21
0
146 people solved
Dec 8, 2025
Uber logo
Uber
Medium
Software Engineer

Detect cycle in directed dependency graph

You are given a directed dependency graph representing services in a system. - There are n services, labeled from 0 to n - 1. - You are given a list o...

Coding & Algorithms
6
0
90 people solved
Dec 8, 2025
Verkada logo
Verkada
Medium
Software Engineer

Find common active intervals across cameras

You are now processing data from multiple security cameras. You are given: - An integer N, the number of cameras. - A threshold value T (a real number...

Coding & Algorithms
7
1
79 people solved
Dec 8, 2025
Verkada logo
Verkada
Medium
Software Engineer

Find motion intervals above threshold

You are processing data from a single security camera. You are given: - A threshold value T (a real number). - A vector (array) of time-stamped motion...

Coding & Algorithms
8
0
103 people solved
Dec 8, 2025
Rippling logo
Rippling
Medium
Software Engineer

Compute median of two sorted arrays

You are given two sorted arrays of integers nums1 and nums2. - nums1 has length m, nums2 has length n. - Both arrays are sorted in non-decreasing orde...

Coding & Algorithms
11
0
213 people solved
Dec 8, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Find shortest path in a grid with obstacles

You are given a 2D grid of size m x n representing a maze. Each cell in the grid is either empty (0) or blocked (1). You are also given two coordinate...

Coding & Algorithms
5
0
66 people solved
Dec 8, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Paginate forward and backward through results

You are asked to extend a basic pagination system to support forward and backward navigation, similar to a cursor-based API. You are given: - A zero-i...

Coding & Algorithms
20
0
174 people solved
Dec 8, 2025
Airwallex logo
Airwallex
Medium
Data ScientistSenior+ Locked

Implement bootstrap mean and variance

This question evaluates a candidate's ability to implement bootstrap resampling and compute statistical estimates for the sampling distribution of the...

Coding & Algorithms
4
0
65 people solved
Dec 8, 2025
TikTok logo
TikTok
Medium
Software Engineer

Find kth smallest in sorted 2D matrix

You are given an n x m matrix of integers where each row and each column is sorted in non-decreasing order. You are also given an integer k such that ...

Coding & Algorithms
3
0
52 people solved
Dec 8, 2025
Walmart Labs logo
Walmart Labs
Easy
Machine Learning Engineer Locked

Find first non-repeating character

This question evaluates string manipulation, frequency-counting concepts, algorithmic complexity reasoning, and attention to edge-case handling in seq...

Coding & Algorithms
3
0
38 people solved
Dec 7, 2025
Google logo
Google
Easy
Software Engineer

Find largest group of two-digit numbers sharing digits

You are given an integer array A of length n (1 <= n <= 100). Each element is a two-digit number (e.g., from 10 to 99). Two numbers are considered con...

Coding & Algorithms
18
0
147 people solved
Dec 5, 2025
Stripe logo
Stripe
Medium
Software Engineer

Compute account balances with rejection and overdraft

You are given a list of transaction records as strings. Each record has the format: ` account_id,timestamp,currency,amount ` - account_id: string iden...

Coding & Algorithms
2
0
17 people solved
Dec 3, 2025
Two Sigma logo
Two Sigma
Hard
Data Scientist

Expected Number of Good Pairs in a Randomly Weighted Complete Graph

Expected Number of Good Pairs in a Randomly Weighted Complete Graph You are given a complete graph on n vertices — every pair of distinct vertices is ...

Coding & Algorithms
0
0
8 people solved
Dec 2, 2025
Confluent logo
Confluent
Medium
Software Engineer

Rank songs by pairwise user preferences

You are given preference rankings for n users over m songs. Each song is labeled from 0 to m - 1. For each user i (0-indexed), you are given an array ...

Coding & Algorithms
26
0
182 people solved
Nov 30, 2025
TikTok logo
TikTok
Medium
Data Scientist

Investigating Correlation Between Ad Visits and Reports

Scenario You are on the analytics team at a large social media platform. A positive correlation has been observed between the number of page visits to...

Analytics & Experimentation
6
0
62 people solved
Jun 22, 2025
Two Sigma logo
Two Sigma
Hard
Data Scientist

Smallest Palindrome Strictly Greater Than K

A palindrome is a positive integer whose decimal representation reads the same forwards and backwards, with no leading zeros. For example, 7, 44, 121,...

Coding & Algorithms
0
0
7 people solved
Nov 28, 2025
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Find longest palindromic substring

This question evaluates knowledge of string algorithms and pattern recognition, focusing on identifying palindromic substrings and reasoning about tim...

Coding & Algorithms
6
0
66 people solved
Nov 28, 2025