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
Uber logo
Uber
Hard
Software Engineer

Find cheapest flight with at most K stops

Problem You are given a directed weighted graph representing flights between cities. Inputs - An integer n: number of cities, labeled 0..n-1. - A list...

Coding & Algorithms
8
0
79 people solved
Dec 25, 2025
TikTok logo
TikTok
Easy
Software Engineer Locked

Solve three classic coding problems

These tasks evaluate algorithmic problem-solving, data structure mastery, and implementation skills within the Coding & Algorithms domain, touching on...

Coding & Algorithms
4
0
37 people solved
Dec 24, 2025
Shopify logo
Shopify
Easy
Software Engineer

Implement a multi-rover Mars controller

Problem Build a small command-line “Mars Rover Controller” program. Single rover (v1) A rover starts at coordinate (0, 0) on an infinite 2D grid and i...

Coding & Algorithms
34
0
383 people solved
Dec 23, 2025
Instacart logo
Instacart
Medium
Software Engineer

Implement timestamped task management system APIs

You are implementing an in-memory Task Management System. All API methods are called with a timestamp representing the logical time when the operation...

Coding & Algorithms
25
0
223 people solved
Dec 21, 2025
Apple logo
Apple
Medium
Machine Learning Engineer

Solve stock and banana problems

Solve both coding problems below. 1. Maximum single-transaction stock profit: Given an array prices where prices[i] is the stock price on day i, retur...

Coding & Algorithms
3
0
42 people solved
Dec 17, 2025
Meta logo
Meta
Medium
Software Engineer

Answer four string/array/battery coding questions

You are given four independent coding questions. Problem A — Uppercase vs lowercase count difference Given a string s (ASCII), count how many characte...

Coding & Algorithms
4
0
46 people solved
Dec 16, 2025
Two Sigma logo
Two Sigma
Hard
Software Engineer

Implement binary encode/decode with frequency tree

Problem Implement a binary encoding and decoding scheme for strings based on character frequencies (Huffman-like coding). You must implement two funct...

Coding & Algorithms
8
0
132 people solved
Dec 15, 2025
Meta logo
Meta
Medium
Software Engineer

Validate near-palindrome and course prerequisite feasibility

Coding round (40 minutes): two problems You do not need to run code, but you should: - Explain your approach clearly. - Walk through the logic on exam...

Coding & Algorithms
2
0
30 people solved
Dec 15, 2025
Google logo
Google
Medium
Software Engineer

Compute shortest delivery route with dangerous stops

Delivery Route Planning With Dangerous Stops You are given delivery stops (nodes) and a set of routes. Each route is a list of stops, and you can trav...

Coding & Algorithms
14
0
152 people solved
Dec 15, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Solve shipping capacity and expression insertion

Problem A: Minimum shipping capacity You are given an array weights where weights[i] is the weight of the i-th package. Packages must be shipped in or...

Coding & Algorithms
10
0
92 people solved
Dec 15, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Determine if a string can be segmented

Given a string s and a list of strings wordDict, determine whether s can be segmented into a sequence of one or more dictionary words. - You may reuse...

Coding & Algorithms
3
0
50 people solved
Dec 15, 2025
Apple logo
Apple
Medium
Machine Learning EngineerNew Grad

Implement TF-IDF scoring for documents

Problem Implement a simplified TF–IDF scorer. You are given: - A list of documents docs, where each document is a string. - A query string q. Tokeniza...

Coding & Algorithms
7
0
71 people solved
Dec 15, 2025
Salesforce logo
Salesforce
Hard
Software Engineer

Implement an LFU cache

Problem: LFU Cache Design and implement a Least Frequently Used (LFU) cache with a fixed capacity. The cache supports the following operations: - get(...

Coding & Algorithms
10
0
85 people solved
Dec 15, 2025
Apple logo
Apple
Medium
Machine Learning EngineerNew Grad

Write a generator for substring pattern matches

Problem Write a generator that scans a string and emits a value whenever a substring matches a given pattern. Input - A string s - A string pattern (n...

Coding & Algorithms
6
0
125 people solved
Dec 15, 2025
Meta logo
Meta
Medium
Software Engineer

Return all root-to-leaf path sums

Problem You are given the root of a binary tree where each node contains an integer value (may be negative). Return an array/list containing the sum o...

Coding & Algorithms
2
0
40 people solved
Dec 15, 2025
Uber logo
Uber
Medium
Machine Learning Engineer

Compute minimal time to finish dependent tasks

Coding: Task Scheduling With Prerequisites (Parallel Allowed) You have n tasks labeled 1..n. Each task takes exactly 1 unit of time to complete. Some ...

Coding & Algorithms
11
0
140 people solved
Dec 15, 2025
TikTok logo
TikTok
Easy
Software Engineer

Implement an LRU cache

Problem: LRU Cache Design and implement a data structure that supports an LRU (Least Recently Used) cache with a fixed capacity. Requirements Implemen...

Coding & Algorithms
5
0
74 people solved
Dec 15, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Implement weighted random city and sparse dot product

Question 1: Weighted random city picker You are given a mapping from city → population (all populations are positive integers). Implement a random gen...

Coding & Algorithms
11
0
80 people solved
Dec 15, 2025
Meta logo
Meta
Easy
Machine Learning Engineer Locked

Solve two linked list/array tasks

This two-part question evaluates proficiency with fundamental data structures and algorithmic problem-solving—specifically linked list manipulation an...

Coding & Algorithms
3
0
62 people solved
Dec 14, 2025
Agoda logo
Agoda
Medium
Software Engineer

Find two numbers that sum to a target

Array sum lookup Given an integer array nums and an integer target, find two distinct indices i and j such that: - nums[i] + nums[j] == target - i != ...

Coding & Algorithms
7
0
66 people solved
Dec 14, 2025