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

Solve three mini-game algorithm tasks

Solve three mini-game algorithm tasks Solve three mini-game algorithm tasks: (a) Move-House Puzzle: Given initial and target arrangements of N labeled...

Coding & Algorithms
12
0
86 people solved
Jul 17, 2025
Stripe logo
Stripe
Medium
Software Engineer

Implement tiered shipping calculator

Implement tiered shipping calculator Implement in JavaScript a shipping-cost calculator with three progressively richer pricing models based on a conf...

Coding & Algorithms
3
0
35 people solved
Jul 17, 2025
Optiver logo
Optiver
Medium
Software Engineer

Detect currency arbitrage with costs

You are given a K×K matrix R of currency exchange rates where R[i][j] is the amount of currency j obtainable for one unit of currency i, and R[i][i] =...

Coding & Algorithms
36
0
261 people solved
Jul 16, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Compute sum of longest positive subarray

Compute sum of longest positive subarray Given an integer array that may contain positive and negative numbers, find the sum of the longest contiguous...

Coding & Algorithms
5
0
46 people solved
Jul 16, 2025
Morgan Stanley logo
Morgan Stanley
Medium
Software Engineer

Count decodings of a digit string

Count decodings of a digit string You are given a non-empty digit string s consisting of characters '0'–'9' and a mapping where 1->'a', 2->'b', ..., 2...

Coding & Algorithms
3
0
37 people solved
Jul 16, 2025
Citadel logo
Citadel
Medium
Software Engineer

Solve two DS&A optimization problems

Problem 1 — Maximize alternating-sum over four array partitions: Given an integer array arr[1..n] (1-based). Choose indices a, b, c with 1 ≤ a ≤ b ≤ c...

Coding & Algorithms
8
0
130 people solved
Jul 16, 2025
TikTok logo
TikTok
Medium
Software Engineer

Parse chemical formula with multipliers

Parse chemical formula with multipliers Given a string representing a chemical formula, parse it and return the total count of each element. The formu...

Coding & Algorithms
3
0
34 people solved
Jul 16, 2025
Abnormal Security logo
Abnormal Security
Medium
Software Engineer

Design a duplicate-file removal algorithm

Design a duplicate-file removal algorithm Your filesystem contains millions of photos. Duplicates are strictly byte-identical files (no ML/CV similari...

Coding & Algorithms
10
0
118 people solved
Jul 16, 2025
J.P. Morgan logo
J.P. Morgan
Medium
Software Engineer

Group anagrams and count string in grid

Part 1 — Group Anagrams: Given an array of strings, group together strings that are anagrams of one another and output both the grouped lists and the ...

Coding & Algorithms
4
0
35 people solved
Jul 16, 2025
Amazon logo
Amazon
Medium
Software Engineer

Describe achievements, ambiguity, conflict, efficiency, challenges

Describe achievements, ambiguity, conflict, efficiency, challenges Behavioral Technical Screen — Multi-part Prompt Context: You are interviewing for a...

Behavioral & Leadership
2
0
30 people solved
Jul 16, 2025
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer

Find shortest word transformation with caching

Find shortest word transformation with caching You are given a start word and an end word of equal length, and a dictionary of valid words. In one mov...

Coding & Algorithms
10
0
94 people solved
Jul 16, 2025
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer

Compute total covered interval length

Compute total covered interval length Given a list of integer intervals [l, r) (half-open), compute the total length covered by at least one interval....

Coding & Algorithms
13
0
106 people solved
Jul 16, 2025
Morgan Stanley logo
Morgan Stanley
Medium
Software Engineer

Compute minimal cost to merge numbers

Compute minimal cost to merge numbers Given an array of positive integers, you may repeatedly perform the following operation until one number remains...

Coding & Algorithms
4
0
41 people solved
Jul 16, 2025
Meta logo
Meta
Medium
Software Engineer

Implement range-sum tree and sort merged lists

Implement range-sum tree and sort merged lists 1) Given a binary tree whose nodes store integer values, and two integers low and high defining an incl...

Coding & Algorithms
4
0
38 people solved
Jul 16, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Design refundable transaction ledger and prioritization rules

Design and implement a transaction ledger that ingests a stream of records where each record is either a payment or a refund. Each payment has {id, us...

Coding & Algorithms
32
0
298 people solved
Jul 16, 2025
Apple logo
Apple
Medium
Data Scientist

Implement sparse vector dot product and cosine similarity

Sparse Vector Class Implement a SparseVector class for high-dimensional vectors where most entries are zero. Representation Assume each vector has: - ...

Coding & Algorithms
6
0
56 people solved
Jul 15, 2025
TikTok logo
TikTok
Medium
Software Engineer

Reconstruct a tree from two traversals

Reconstruct a tree from two traversals Given two arrays representing the preorder and inorder traversals of a binary tree with unique values, reconstr...

Coding & Algorithms
4
0
45 people solved
Jul 15, 2025
Google logo
Google
Medium
Software Engineer

Decide string transform with directional tokens and walls

Decide string transform with directional tokens and walls You are given two equal-length strings start and target of length n, each consisting only of...

Coding & Algorithms
4
0
59 people solved
Jul 15, 2025
Uber logo
Uber
Medium
Software Engineer

Implement uniform sampling in squares

Implement uniform sampling in squares Implement a class Square representing an axis-aligned square on the 2D plane that supports sampling a uniformly ...

Coding & Algorithms
6
0
75 people solved
Jul 15, 2025
SoFi logo
SoFi
Medium
Software Engineer

Design a key-value store with getLast

Design a key-value store with getLast Design and implement an in-memory key–value store with this API: add(key, value), get(key), remove(key), and get...

Coding & Algorithms
11
0
82 people solved
Jul 15, 2025