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

Compute community ranges and town idle hours

You are given two in-memory datasets for a party-planning app. 1) PartyWindow: {partyId: string, startTime: ISO-8601 UTC datetime, endTime: ISO-8601 U...

Coding & Algorithms
12
0
135 people solved
Sep 6, 2025
UiPath logo
UiPath
Medium
Machine Learning Engineer

Implement cocktail shaker sort and analyze

Implement the cocktail shaker sort (bidirectional bubble sort) for an array of integers. Optimize it with early termination and shrinking bounds, and ...

Coding & Algorithms
4
0
33 people solved
Sep 6, 2025
Reddit logo
Reddit
Medium
Machine Learning Engineer

Load and prepare JSON for modeling

Using Python in a Jupyter notebook, load a JSON dataset with fields: ( 1) hours spent reading A posts (float), ( 2) hours spent reading B posts (float...

Data Manipulation (SQL/Python)
0
0
6 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Design LRU cache with O(1) operations

Design and implement an in-memory cache that evicts the least recently used entry when capacity is reached. Support get(key) and put(key, value) in O(...

Coding & Algorithms
2
0
27 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Merge overlapping and adjacent ranges

Given an unsorted list of integer ranges represented as half-open intervals [start, end) with start < end, merge all overlapping or directly adjacent ...

Coding & Algorithms
2
0
32 people solved
Sep 6, 2025
SoFi logo
SoFi
Medium
Software Engineer

Simulate 1-D collisions and scale to huge inputs

Given an array of integers representing objects on a 1-D track, where the sign indicates direction (positive moves right, negative moves left) and the...

Coding & Algorithms
4
0
67 people solved
Sep 6, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Determine sanitized palindrome in string

Write a function that determines whether a string is a palindrome after removing non-alphanumeric characters and ignoring case (e.g., punctuation, whi...

Coding & Algorithms
6
0
61 people solved
Sep 6, 2025
WeRide logo
WeRide
Medium
Software Engineer

Implement expression expansion to plus-only form

Given a string expression consisting only of lowercase letters (variables), '+', '*', '(', and ')', return an equivalent expression that uses only '+'...

Coding & Algorithms
2
0
44 people solved
Sep 6, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Implement binary search for boundary index

Given a sorted integer array nums (length n) and an integer target t, return the index of the first element in nums that is greater than or equal to t...

Coding & Algorithms
7
0
57 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Simulate one-round color elimination on a grid

Given an m x n integer matrix board where board[r][c] > 0 represents a color and 0 represents empty: ( 1) A nonzero cell at (r,c) explodes in this rou...

Coding & Algorithms
11
0
77 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Find top-K frequent values with tiebreaks

Question Given an integer array nums and an integer k, return the k values with the highest frequency. The array can contain up to 10^6 elements. When...

Coding & Algorithms
5
0
40 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Find kth smallest pair sum with heaps

You are given two nondecreasing arrays A (length n) and B (length m) of non-negative integers and an integer k (1 <= k <= n*m). Return the k-th smalle...

Coding & Algorithms
3
0
48 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Sort by squares and find k-th smallest

Given a nondecreasing sorted array of integers nums, do the following: 1) Reorder the original elements by increasing square value (equivalently, by a...

Coding & Algorithms
9
0
73 people solved
Sep 6, 2025
Samsung logo
Samsung
Medium
Machine Learning Engineer

Validate palindrome with constraints

Given a string s, return true if s reads the same forward and backward after removing all non-alphanumeric characters and ignoring letter case. Implem...

Coding & Algorithms
4
0
33 people solved
Sep 6, 2025
Google logo
Google
Medium
Software Engineer

Maximize coins collected by 3-step pieces

You are given a 1D board of length N. Each cell is in one of three states: - Empty - Piece (a movable token) - Coin (collectible) In one move, you may...

Coding & Algorithms
4
0
71 people solved
Sep 5, 2025
Google logo
Google
Medium
Software Engineer

Find largest subset sharing a common digit

You are given a list of two-digit integers (each from 10 to 99, inclusive). You want to select as many numbers as possible in one selection such that:...

Coding & Algorithms
6
0
69 people solved
Sep 5, 2025
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Solve sampling and streaming tasks

This question evaluates algorithmic problem-solving, data structure design, probabilistic reasoning for weighted random selection, sliding-window stri...

Coding & Algorithms
1
0
28 people solved
Sep 4, 2025
Trexquant logo
Trexquant
Medium
Software Engineer

Implement Trie search with wildcard matching

Design a text dictionary using a Trie. Support the following operations: - addWord(word): Insert a lowercase English word. - search(pattern): Return t...

Coding & Algorithms
5
0
71 people solved
Sep 1, 2025
Apple logo
Apple
Easy
Data Scientist

Write queries to compute salary and budget stats

You are given the following interview tasks. Write solutions in SQL and/or Python (pandas) as appropriate. Task 1 — Second highest salary You have a t...

Data Manipulation (SQL/Python)
10
0
71 people solved
Aug 24, 2025
Meta logo
Meta
Medium
Data Scientist

Find the most-used app

You work on Oculus app engagement analytics. Tables user_activity - user_id (BIGINT) - date (DATE) — day of activity (assume UTC unless otherwise spec...

Data Manipulation (SQL/Python)
4
0
31 people solved
Aug 17, 2025