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

Evaluate word-guess feedback with repeats

You are implementing feedback for a Wordle-like guessing game. Part 1 — Produce feedback for one guess You are given two strings of equal length guess...

Coding & Algorithms
13
0
100 people solved
Dec 2, 2025
Applied logo
Applied
Easy
Software Engineer

Evaluate variables in simple arithmetic DSL

You are given a small DSL (domain-specific language) consisting of variable assignments, one per line. Each line has the form: `text <identifier> = <e...

Coding & Algorithms
5
0
40 people solved
Dec 1, 2025
Grammarly logo
Grammarly
Easy
Software Engineer

Implement string reduction and time map

In a coding interview, you are asked to solve two algorithm problems. 1. String reduction with adjacent duplicates - Basic version: Given a string ...

Coding & Algorithms
10
0
84 people solved
Nov 29, 2025
Two Sigma logo
Two Sigma
Hard
Data Scientist

Assign 2n Workers to Two Tasks to Minimize Total Time

You manage 2n workers and two tasks, A and B. Every worker must be assigned to exactly one task, and each task must be staffed by exactly n workers. W...

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

Debug Tensor Conversion Bugs

You are given a small tensor utility library used in distributed numerical code. The implementation has several bugs related to aliasing, array conver...

Coding & Algorithms
2
0
15 people solved
Nov 27, 2025
TikTok logo
TikTok
Easy
Data Scientist

Write monthly customer and sales SQL queries

You are analyzing a food-delivery marketplace. Tables Assume the following schema (you may add minor helper CTEs as needed): orders - order_id (BIGINT...

Data Manipulation (SQL/Python)
6
4
84 people solved
Nov 27, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Implement sin(x) with precision constraints

Coding Question: Implement sin(x) Implement a function that returns an approximation of the trigonometric sine function. Function signature - Input: a...

Coding & Algorithms
4
0
67 people solved
Nov 26, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Find longest substring without repeating characters

Problem Given a string s, return the length of the longest contiguous substring that contains no repeated characters. Input - s: a string (may contain...

Coding & Algorithms
3
0
65 people solved
Nov 25, 2025
Google logo
Google
Medium
Data ScientistSenior+

Implement Fibonacci with efficiency constraints

Write a function fib(n) that returns the nth Fibonacci number (0-indexed: fib(0)=0, fib(1)=1). Requirements: - Handle n up to at least 10^6. - Discuss...

Coding & Algorithms
6
0
56 people solved
Nov 24, 2025
Google logo
Google
Medium
Data ScientistSenior+

Simulate Uniform(0,1) from random bits

Assume you have access to a function rand_bit() that returns 0 or 1 with equal probability and independent across calls. How would you generate a rand...

Coding & Algorithms
2
0
36 people solved
Nov 24, 2025
Meta logo
Meta
Medium
Data Scientist

How do you expand nested placeholders in strings?

You are given a dictionary of string templates. Keys are identifiers like X, Y, Z. A template may contain placeholders of the form %KEY%, which should...

Coding & Algorithms
3
0
35 people solved
Nov 24, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Implement a versioned recipe management system

You are asked to implement an in-memory Recipe Management System (similar in difficulty to a simple banking/in-memory DB exercise). The system support...

Coding & Algorithms
19
0
232 people solved
Nov 23, 2025
Meta logo
Meta
Medium
Software Engineer Locked

Design an online chess game with undo and leaderboard

This question evaluates proficiency in real-time system design, state management, and concurrency control for multiplayer games, including consistency...

System Design
8
0
62 people solved
Nov 22, 2025
Google logo
Google
Hard
Software Engineer

Count same-color squares in a character grid

You are given a 2D grid (matrix) of characters. Each character represents a color: cells with the same character are considered the same color. Formal...

Coding & Algorithms
13
1
157 people solved
Nov 22, 2025
Snowflake logo
Snowflake
Hard
Software Engineer

Implement course scheduling and rate limiter analysis

You are given two independent coding problems. --- Problem 1: Course Scheduling You are planning to take a set of courses and are given prerequisite r...

Coding & Algorithms
16
0
218 people solved
Nov 22, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Count connected land components in a grid

You are given a 2D grid of characters where: - '1' represents land - '0' represents water A group of land cells forms an island if they are connected ...

Coding & Algorithms
9
0
85 people solved
Nov 21, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Find two numbers that sum to target

Given an integer array nums of length n and an integer target, return the indices (i, j) (0-based) of two distinct elements such that nums[i] + nums[j...

Coding & Algorithms
2
0
27 people solved
Nov 20, 2025
Sigmacomputing logo
Sigmacomputing
Easy
Software Engineer

Implement a basic pivot table with totals

You are given a small in-memory table of data and are asked to implement a simplified pivot table operation and a printer for it. Assume the input dat...

Coding & Algorithms
6
0
97 people solved
Nov 20, 2025
Deshaw logo
Deshaw
Medium
Machine Learning Engineer

Implement sqrt and parity-based array rearrangement

You are given two independent coding tasks. --- Task 1: Implement Square Root Without Math Library Implement a function that computes the square root ...

Coding & Algorithms
8
0
60 people solved
Nov 20, 2025
Mavensecurities logo
Mavensecurities
Medium
Data Scientist

Compute probability of random arithmetic progression triple

You have the integers from 1 to 30 inclusive. You randomly choose 3 distinct numbers without replacement, and all 3-element subsets are equally likely...

Coding & Algorithms
1
0
23 people solved
Nov 20, 2025