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 486 Companies08.11.2026
Showing 20 results
Role
Roblox logo
Roblox
Medium
Software Engineer

Randomly partition array into k segments

Question Given a list of integers and an integer k representing the number of segments, write a function that randomly partitions the list into k non-...

Coding & Algorithms
25
0
68 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve island connectivity and string multiplication

Question Given N distinct islands (e.g., a, b, c…) and a list of existing undirected paths between them, compute the minimum number of additional path...

Coding & Algorithms
11
0
51 people solved
Jul 29, 2025
TikTok logo
TikTok
Medium
Software Engineer

Flatten object & Promise.all

Question Given a nested JavaScript object, write a function to flatten it so that nested keys are converted to a single-level path (e.g., {a:{b:1}} ->...

Coding & Algorithms
16
0
56 people solved
Jul 29, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Count islands and distinct shapes

Question LeetCode 200. Number of Islands LeetCode 694. Number of Distinct Islands https://leetcode.com/problems/number-of-islands/description/ https:/...

Coding & Algorithms
4
0
20 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve island and frequency problems

Question LeetCode 200. Number of Islands – given a 2D grid, count the number of connected islands of '1's using DFS/BFS/Union-Find. LeetCode 695. Max ...

Coding & Algorithms
41
0
67 people solved
Jul 29, 2025
Harvey logo
Harvey
Medium
Software Engineer

Handle multi-source string matching and tagging

Question Given an LLM output string and a list of source strings, design an algorithm to count how many times each source appears in the output. Exten...

Coding & Algorithms
20
0
51 people solved
Jul 29, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Implement in-memory DB querying

Question Implement an in-memory database that supports: 1. Querying the whole table and returning only selected columns (projection). 2. Adding WHERE ...

Coding & Algorithms
191
1
663 people solved
Jul 29, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Implement thread-safe blocking queue

Question Design and implement a thread-safe bounded blocking queue that supports concurrent enqueue and dequeue operations using standard synchronizat...

Coding & Algorithms
8
0
13 people solved
Jul 29, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute minimum passes over permutation

Question You are given an array shelf representing a permutation of the integers 1..n. Starting with target = 1, you repeatedly scan the array left-to...

Coding & Algorithms
66
0
139 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Solve diverse LeetCode algorithm problems

Question LeetCode 695. Max Area of Island LeetCode 380. Insert Delete GetRandom O( 1) LeetCode 19. Remove Nth Node From End of List LeetCode 1004. Max...

Coding & Algorithms
3
0
14 people solved
Jul 29, 2025
Pinterest logo
Pinterest
Medium
Software Engineer

Round numeric string values

Question Given a numeric string, implement rounding to the nearest integer (e.g., '3.5' → '4', '100.01' → '100'). Follow-up: round to the last signifi...

Coding & Algorithms
14
0
32 people solved
Jul 29, 2025
Google logo
Google
Medium
Software Engineer

Find shortest path with blocked nodes

Question Given an unweighted graph, a start node, an end node, and a block_set of nodes that cannot be traversed, return the length of the shortest pa...

Coding & Algorithms
6
0
9 people solved
Jul 29, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve intervals and distinct islands

Question LeetCode 56. Merge Intervals LeetCode 694. Number of Distinct Islands https://leetcode.com/problems/merge-intervals/description/ https://leet...

Coding & Algorithms
6
0
22 people solved
Jul 29, 2025
Instacart logo
Instacart
Medium
Software Engineer

Parse password from indexed matrix file

Question Given a filepath to a text file containing one index line [x, y] followed by a matrix of characters (origin at lower-left (0, 0)), return the...

Coding & Algorithms
29
0
69 people solved
Jul 29, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Handle cards, islands, Trie, median

Question LeetCode 914. X of a Kind in a Deck of Cards LeetCode 694. Number of Distinct Islands LeetCode 208. Implement Trie (Prefix Tree) LeetCode 295...

Coding & Algorithms
11
0
32 people solved
Jul 29, 2025
DRW logo
DRW
Medium
Machine Learning Engineer

Process CSV for portfolio returns and metrics

Given one or more CSV files containing daily asset prices or returns and optional portfolio weights, write Python (pandas) code to: a) load, clean, an...

Data Manipulation (SQL/Python)
0
0
9 people solved
Jul 29, 2025
NVIDIA logo
NVIDIA
Medium
Software Engineer

Reconstruct tree from inorder and postorder

Given two arrays representing the inorder and postorder traversals of a binary tree with unique values, reconstruct the original binary tree and retur...

Coding & Algorithms
8
0
57 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Design weighted random index picker

Design and implement a data structure that, given an array of positive integer weights w[0..n−1], supports pick() that returns index i with probabilit...

Coding & Algorithms
5
0
46 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Describe a recent project you led

Describe a recent project you led Behavioral Prompt: Project Leadership Walkthrough (Software Engineer) Provide a concise, end-to-end walkthrough of a...

Behavioral & Leadership
2
0
31 people solved
Jul 29, 2025
TikTok logo
TikTok
Medium
Software Engineer

Compute widest level span in a binary tree

Given a binary tree, define the width of a level as the number of positions between the leftmost and rightmost non-empty nodes at that depth when node...

Coding & Algorithms
2
0
38 people solved
Jul 29, 2025