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
Snapchat logo
Snapchat
Hard
Software Engineer

Compute longest increasing path in matrix

You are given an m x n grid (matrix) of integers grid, where m >= 1 and n >= 1. A path in the matrix is a sequence of cells where: - You may move from...

Coding & Algorithms
5
0
67 people solved
Dec 8, 2025
Snapchat logo
Snapchat
Hard
Software Engineer

Count ways to decode digit string

You are given a string s consisting of digits '0' to '9'. The string encodes a message using the following mapping: - '1' → A, '2' → B, ..., '26' → Z....

Coding & Algorithms
12
0
83 people solved
Dec 8, 2025
Google logo
Google
Hard
Software Engineer

Shuffle array using random integer API

You are given an array nums of length n representing a deck of distinct cards. You do not have access to a built-in shuffle function, but you are give...

Coding & Algorithms
6
0
79 people solved
Dec 8, 2025
Google logo
Google
Hard
Software Engineer

Find longest duplicated substring

You are given a string s consisting of lowercase English letters. A substring of s is any contiguous sequence of characters, i.e., s[i..j) for 0 ≤ i <...

Coding & Algorithms
10
0
141 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
0
78 people solved
Dec 8, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement integer division without using division

You are given two 32-bit signed integers dividend and divisor. Implement a function that divides dividend by divisor and returns the integer quotient,...

Coding & Algorithms
7
0
53 people solved
Dec 8, 2025
Meta logo
Meta
Medium
Software Engineer

Validate complete binary tree

You are given the root of a binary tree. A complete binary tree is defined as a binary tree in which: 1. Every level, except possibly the last, is com...

Coding & Algorithms
1
0
23 people solved
Dec 8, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Implement basic pagination for a list

You are given: - A zero-indexed array of items items (you can assume it fits in memory). - An integer pageSize > 0. Design and implement a pagination ...

Coding & Algorithms
16
0
191 people solved
Dec 8, 2025
Scale AI logo
Scale AI
Medium
Software Engineer

Compute clock hand angle with seconds and milliseconds

You are given a time in the format "HH:MM", representing a 24-hour clock time with hours and minutes. Extend this to potentially include seconds and m...

Coding & Algorithms
10
0
160 people solved
Dec 8, 2025
Google logo
Google
Hard
Machine Learning Engineer

Design data structure similar to LRU cache

You are asked to design and implement a data structure that behaves similarly to an LRU (Least Recently Used) cache, but with a small variation: - The...

Coding & Algorithms
5
1
57 people solved
Dec 8, 2025
Google logo
Google
Easy
Software Engineer

Find largest digit-sharing subset

You are given an array of N integers. Each integer has exactly two decimal digits (i.e., each element is between 10 and 99 inclusive). You want to cho...

Coding & Algorithms
10
0
112 people solved
Dec 8, 2025
Meta logo
Meta
Easy
Data Scientist

Compute percent of active users with 50+ calls

Problem You work on a Messenger-like app. You want to measure how many active users in Great Britain (GB) today have been heavy callers recently. Tabl...

Data Manipulation (SQL/Python)
8
1
109 people solved
Dec 8, 2025
Meta logo
Meta
Easy
Data Scientist

Compute active ad revenue by creation source

You work on an ads platform and need to report active ad revenue broken down by the ad’s creation source. Tables ads - ad_id BIGINT PK - advertiser_id...

Data Manipulation (SQL/Python)
3
0
27 people solved
Dec 6, 2025
Rokt logo
Rokt
Easy
Software Engineer

Implement basic calculator with four operations

Implement a basic arithmetic expression evaluator. Problem You are given a string s representing a mathematical expression containing non-negative int...

Coding & Algorithms
4
0
30 people solved
Dec 6, 2025
Stripe logo
Stripe
Easy
Software Engineer

Implement stateful connection router simulator

You are implementing a simplified connection router / load balancer for a Jupyter-like multi-tenant server system. There are N target servers, indexed...

Coding & Algorithms
2
0
30 people solved
Dec 6, 2025
Google logo
Google
Easy
Software Engineer

Maximize coins with tokens moving by +3

You are given a 1D board represented by a string s of length n. Each character is one of: - '.' — an empty cell - 'C' — a cell containing exactly one ...

Coding & Algorithms
21
2
203 people solved
Dec 5, 2025
Meta logo
Meta
Medium
Data Scientist

Detect earliest collision among moving cars

You are given n vehicles with kinematics parameters. A “collision” means two vehicles occupy the same position at the same time. Assume continuous tim...

Coding & Algorithms
4
0
30 people solved
Dec 4, 2025
Databricks logo
Databricks
Easy
Data Scientist

Count weekly customers with ≥$1000 YTD spend

Question You are given a transaction-level table and must compute a weekly time series of how many customers have reached a year-to-date spending thre...

Data Manipulation (SQL/Python)
9
1
94 people solved
Dec 3, 2025
Databricks logo
Databricks
Easy
Data Scientist Locked

Test if coin is fair from 560 tails

This question evaluates understanding of hypothesis testing for proportions, including formulation of null and alternative hypotheses, computation of ...

Statistics & Math
2
0
39 people solved
Dec 3, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute peak parking lot occupancy intervals

You are given logs from a parking lot system. Each log entry has the form: [carId, time, eventType] - carId is an integer identifying a car. - time is...

Coding & Algorithms
6
0
99 people solved
Dec 2, 2025