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
Meta logo
Meta
Medium
Machine Learning Engineer

Optimize ribbon piece length by binary search

Given an array lengths of positive integers and an integer k, you may cut each element into pieces of integer length L > 0. Find the maximum L such th...

Coding & Algorithms
3
0
48 people solved
Sep 6, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Maximize profit with transaction fees

You are given an array prices where prices[i] is the price of a stock on day i and an integer fee representing the commission charged when you sell. Y...

Coding & Algorithms
14
0
97 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Reverse sublist between equal-value nodes

Given the head of a singly linked list and a target value v that appears at least twice, reverse the sublist starting at the first node with value v a...

Coding & Algorithms
4
0
38 people solved
Sep 6, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Solve six algorithmic problems

Answer the following independent algorithmic prompts. For each, explain your approach, justify data structures, analyze time/space complexity, and pro...

Coding & Algorithms
7
0
135 people solved
Sep 6, 2025
Datadog logo
Datadog
Medium
Software Engineer

Implement write with internal buffer

Implement a buffered writer over an expensive sink API. You are given a function writeToDevice(byte[] chunk) that may accept at most M bytes per call ...

Coding & Algorithms
0
0
8 people solved
Sep 6, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Detect intersection of two linked lists

Given two singly linked lists that may converge to share a common tail, determine whether they intersect and return the first node at which they join....

Coding & Algorithms
4
0
59 people solved
Sep 6, 2025
Google logo
Google
Medium
Software Engineer

Find minimum covering substring

Given two strings s and t, return the shortest contiguous substring of s that contains every character of t with at least the same multiplicities. If ...

Coding & Algorithms
6
0
81 people solved
Sep 6, 2025
Airtable logo
Airtable
Medium
Software Engineer

Implement BFS serializer and deserializer

Implement two functions, serialize(obj) -> representation and deserialize(representation) -> obj, for a Python object graph containing str, int, and d...

Coding & Algorithms
24
0
191 people solved
Sep 6, 2025
Rippling logo
Rippling
Medium
Software Engineer

Compute maximum simultaneous drivers

Given N driver online intervals [start_time, end_time) during a day, compute the maximum number of drivers simultaneously online at any moment. Handle...

Coding & Algorithms
11
0
140 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Find next and closest palindromes

Given a non-negative integer represented as a string n (no leading zeros unless n == "0"), return the smallest palindromic integer strictly greater th...

Coding & Algorithms
6
0
65 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Segment a message with width-constrained suffixes

Given a message string s and an integer width W, split s into consecutive segments and append a suffix "i/n" to each segment indicating its 1-indexed ...

Coding & Algorithms
5
0
42 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Compute top-N active customers

Maintain and return the top N customers by cumulative activity amount, where activity is defined as the sum of deposit amounts, pay amounts, and trans...

Coding & Algorithms
5
0
40 people solved
Sep 6, 2025
Apple logo
Apple
Medium
Software Engineer

Sort and merge string lists by length

Given two unsorted lists of strings, return a single list sorted by ascending string length. Specify your tie-breaking rule for equal-length strings (...

Coding & Algorithms
5
0
63 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find returning users from access logs

Given an unordered log of web access events, identify which users are returning (i.e., they have visited on at least two different calendar days). Eac...

Coding & Algorithms
1
0
8 people solved
Sep 6, 2025
OpenAI logo
OpenAI
Medium
Machine Learning Engineer

Find earliest supporting version under constraints

You are given version strings formatted as {major}.{minor}.{patch}, e.g., "103.003.03". Each version either supports a feature or not. You may call is...

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

Implement multi-network card validator with Luhn

Design and implement a payment card validation module that supports multiple networks and error scenarios. Requirements: 1) Luhn checksum - Implement ...

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

Find first error and propagate failures

You are given a chronological log history where each entry is a string prefixed with one of [Info], [Warn], or [Error]. Two invariants hold: ( 1) once...

Coding & Algorithms
1
0
13 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find longest segment with endpoints > interior

Given an integer array nums, find the length of the longest contiguous segment [i..j] (j−i+1 ≥ 2) such that both endpoints are strictly greater than e...

Coding & Algorithms
2
0
23 people solved
Sep 6, 2025
Apple logo
Apple
Medium
Software Engineer

Design card deck with shuffle and order

Design a playing-card deck library with two methods: shuffle() to return a uniformly random permutation of a standard 52-card deck, and order() to ret...

Coding & Algorithms
3
0
68 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find earliest time password becomes irrecoverable

You are given a password string of length n and an attack order array attackOrder[1..n], a permutation of 1..n. At second i (1-indexed), the virus rep...

Coding & Algorithms
1
0
9 people solved
Sep 6, 2025