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

Compare convolutions and transformers

Compare CNNs and Transformers Task Explain the key differences between convolutional neural networks (CNNs) and transformer architectures. Specificall...

Machine Learning
12
0
137 people solved
Aug 13, 2025
Optiver logo
Optiver
Medium
Software Engineer

Implement price-based order matcher

Design and implement a price-based order matcher for unit-sized orders. You are given an array orders where each element is [type, price]: type = 1 de...

Coding & Algorithms
39
0
392 people solved
Aug 13, 2025
Scale AI logo
Scale AI
Medium
Machine Learning Engineer

Implement universal adversarial attack on GPT-2

Robustness Evaluation: Universal Adversarial Prompts for GPT-2 You are in a Machine Learning Engineer interview. Explain how you would build a control...

Machine Learning
18
0
182 people solved
Jul 8, 2025
Coinbase logo
Coinbase
Medium
Data Scientist Locked

Implement Plus One

This question evaluates proficiency in array manipulation, elementary arithmetic operations such as carry propagation, and careful handling of edge ca...

Coding & Algorithms
3
0
64 people solved
Mar 17, 2026
Apple logo
Apple
Medium
Software EngineerSenior+

Design Disk-Based Inventory Serving

Design software for a machine that has no SSD storage and only a small amount of RAM. The machine must service inventory requests using spinning disks...

System Design
7
0
51 people solved
Oct 28, 2025
xAI logo
xAI
Medium
Software Engineer

Explain arrays and memory layout

What is an array? How is an array represented in memory (contiguous layout, element size and alignment, indexing arithmetic). Analyze time complexitie...

Coding & Algorithms
10
0
90 people solved
Aug 12, 2025
Two Sigma logo
Two Sigma
Medium
Data ScientistIntern

Predict Stock Prices from Google Search Data

You are given access to historical Google search data — relative search volume over time for arbitrary query terms — along with standard historical ma...

Machine Learning
6
0
48 people solved
Dec 1, 2024
Goldman Sachs logo
Goldman Sachs
Medium
Software Engineer

How would you handle conflict and data pressure?

Behavioral questions (answer both) 1) Leading amid collaborator disagreement You are newly assigned as the team lead by your manager. One collaborator...

Behavioral & Leadership
6
0
60 people solved
Dec 9, 2025
Walmart Labs logo
Walmart Labs
Easy
Software EngineerSenior+

Handle conflict and motivate engineering teams

You are interviewing for a Senior Software Engineer / Tech Lead role. The interviewer asks two related leadership questions: 1. Handling conflict ...

Behavioral & Leadership
4
0
52 people solved
Dec 9, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement PyTorch training loop

Implement a basic PyTorch training loop You are given a PyTorch neural network model, a DataLoader that yields (inputs, targets) batches, an optimizer...

Coding & Algorithms
9
0
93 people solved
Dec 8, 2025
Amazon logo
Amazon
Easy
Machine Learning Engineer

List hyperparameter tuning methods

Describe common methods for hyperparameter tuning in machine learning. For each method, explain: - How it works conceptually. - Its advantages and dis...

Machine Learning
16
0
102 people solved
Dec 8, 2025
Amazon logo
Amazon
Easy
Machine Learning Engineer Locked

Analyze attention complexity and improvements

This question evaluates understanding of Transformer self-attention in the Machine Learning domain, testing the ability to analyze time and space comp...

Machine Learning
5
0
86 people solved
Dec 8, 2025
Amazon logo
Amazon
Easy
Machine Learning Engineer

Describe overfitting and L1/L2 regularization

Define overfitting in machine learning and explain why it is harmful. Then describe L1 and L2 regularization: - How each one modifies the loss functio...

Machine Learning
5
0
76 people solved
Dec 8, 2025
Amazon logo
Amazon
Easy
Machine Learning Engineer

Explain the bias–variance trade-off

Explain the bias–variance trade-off in supervised learning. In your answer, cover: - What bias and variance mean in the context of a prediction model....

Machine Learning
4
0
51 people solved
Dec 8, 2025
Databricks logo
Databricks
Medium
Software Engineer

Implement run-length encoding and decoding

You are given a string consisting of lowercase English letters. You need to implement run-length encoding (RLE) and its corresponding decoding. 1. Enc...

Coding & Algorithms
43
0
371 people solved
Dec 8, 2025
Hive.Ai logo
Hive.Ai
Easy
Software EngineerSenior+

Design a Synchronous Text Classification API

Design a Synchronous Text Classification API A trained machine-learning model classifies text. Design the system that exposes this model through synch...

ML System Design
1
0
9 people solved
May 17, 2026
Databricks logo
Databricks
Medium
Software Engineer Locked

Find the Best Commute Mode

This question evaluates competency in grid-based pathfinding, graph traversal, and multi-criteria optimization of path time and cost within the Coding...

Coding & Algorithms
3
0
22 people solved
May 17, 2026
Morgan Stanley logo
Morgan Stanley
Medium
Data Scientist

How do you escape the circle?

A dog runs continuously along the boundary of a circle of radius 1 at speed 4. You start at an arbitrary point strictly inside the circle and can run ...

Coding & Algorithms
3
0
50 people solved
Dec 8, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve pair-counting and account-merging problems

Problem A — Count qualifying products You are given two integer arrays A and B, and an integer T. For each element a in A, count how many elements b i...

Coding & Algorithms
3
0
57 people solved
Dec 8, 2025
Amazon logo
Amazon
Medium
Software Engineer

Solve three coding tasks: binary search, tree path, subarray

Solve three coding tasks: binary search, tree path, subarray Solve the following coding tasks: 1) In a sorted array, every value appears exactly twice...

Coding & Algorithms
7
0
56 people solved
Aug 10, 2025