Google Software Engineer Interview Questions
Practice the exact questions companies are asking right now.
Parse strings and find meeting slots
Question Given a text file where each line contains raw information, extract the user identifier and the numeric quantity on that line and store the r...
Remove elements to avoid k-prefix duplicates
Question Given two lists listA and listB and an integer k, delete elements from listB so that the first k elements of the new listB share no value wit...
Show leadership and teamwork
Behavioral Leadership Question Context You are in an onsite software engineering behavioral and leadership interview. The interviewer wants to assess ...
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...
Maximize 1D deliveries within distance and minimize total distance
You are given positions on a 1D line: - people: an array of N integers (positions of people) - shops: an array of M integers (positions of milk-tea sh...
Match people to questions using tags and priorities
You are building a simplified “Q&A matching” feature. You have: - people: N people, where person i has a set of expertise tags P[i]. - questions: M qu...
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...
Design a Twitter hashtag metrics aggregator
System Design: Hashtag Metrics Aggregator Design a service that ingests a high-volume stream of social posts (like tweets) and produces metrics/aggreg...
Answer common behavioral questions with follow-ups
Behavioral interview prompt set You are in a standalone Behavioral (BQ) interview. The interviewer asks straightforward, keyword-based questions and t...
Recommend top-K movies from similarity graph
Movie Recommendation: Top K You are building a simple movie recommendation feature. Input - A set of movies 0..(M-1). - An undirected similarity graph...
Compute city skyline outline
You are given a list of rectangular buildings in a 2D city skyline. Each building is represented by three integers [L, R, H]: - L: the x-coordinate of...
Explain handling a tight project deadline
In a behavioral interview for a software engineering or technical role, you are asked: > Describe a time you had to work under a very tight deadline. ...
Describe a conflict with a colleague
In a behavioral interview for a software engineering or technical role, you are asked: > Tell me about a time you had a conflict or disagreement with ...
Describe a major challenge you faced
In a behavioral interview for a software engineering or technical role, you are asked: > Describe the most significant challenge you have faced in an ...
Shuffle array using random integer API
You are given an array nums of length n representing a deck of distinct cards. You do not have access to a built-in shuffle function, but you are give...
Find maximum value in huge text file
You are given the path to a very large text file on disk. The file has the following properties: - Each line contains exactly one signed 64-bit intege...
Find longest duplicated substring
You are given a string s consisting of lowercase English letters. A substring of s is any contiguous sequence of characters, i.e., s[i..j) for 0 ≤ i <...
Find largest digit-sharing subset
You are given an array of N integers. Each integer has exactly two decimal digits (i.e., each element is between 10 and 99 inclusive). You want to cho...
Find largest group of two-digit numbers sharing digits
You are given an integer array A of length n (1 <= n <= 100). Each element is a two-digit number (e.g., from 10 to 99). Two numbers are considered con...
Maximize coins with tokens moving by +3
You are given a 1D board represented by a string s of length n (1 <= n <= 100). Each character is one of: - '.': empty cell - 'C': a cell containing o...