Google Interview Questions
Practice the exact questions companies are asking right now.
Find median of merged RLE arrays
Problem You are given two run-length encoded (RLE) arrays A and B. Each is sorted by value in non-decreasing order. - Each element is a pair (value, f...
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...
Assign meetings to rooms with delays
You are given: - An integer n (number of meeting rooms, labeled 0..n-1). - A list of m meetings meetings[i] = [start_i, end_i) with start_i < end_i. A...
Minimize travel time with optional meeting point
You are given a connected graph representing travel between locations. - Each node is a location. - Each edge has a non-negative travel time (if your ...
Solve meeting-room scheduling and shortest paths
You are asked to solve two algorithmic problems. Part A: Meeting-room scheduling (intervals) You are given an array of meeting time intervals interval...
Design large-scale near-duplicate video detection
Design a product-grade fuzzy (near-)duplicate detection system for a large short-video platform. You need to detect whether an uploaded video is a nea...
Design an object-oriented poker game
Design the object-oriented architecture for a command-line poker game. Requirements (clarify and state assumptions) Assume a standard 52-card deck (no...
Answer parity-alternation range queries
You are given an integer array nums of length n and q queries. Each query is a pair [l, r] (0-indexed, inclusive). A subarray nums[l..r] is called alt...
How do you handle workplace conflict scenarios?
Answer the following conflict-focused behavioral questions. Use concrete examples from your experience. 1. Conflict with a peer: Describe a time you h...
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...
Design a logger that returns top-K messages
Problem Design an in-memory logging component that supports recording log events and querying the top K most frequent messages. Each log event has: - ...
Estimate population singletons from a 10% log
A daily search log has one row per query string. You draw a 10% simple random sample of rows without replacement. Define a “unique query” (singleton) ...
Measure causal impact of YouTube ads
Estimate the incremental effect of a 6‑week YouTube campaign on weekly online sales. - Explain why naive OLS of sales on ad spend is biased; list at l...
How would you answer these behavioral prompts?
You are in a behavioral interview. Prepare structured answers (with concrete examples) for the following prompts. Expect follow-ups such as: Why was y...
Respond to long-term concerns after A/B success
Your model performs well in an A/B test (statistically significant lift on the primary metric). However, your manager believes the model may harm long...
Answer common team leadership scenarios
Answer the following behavioral questions with concrete examples: 1. Supporting the team / stepping up: - Tell me about a time you stepped up or st...
Answer project deep-dive and Why Google questions
Scenario This round is conversational (no coding). The interviewer asks about: - One or more personal projects (deep dive) - Internship experience and...
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...
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...
How would you lead a team through delivery issues?
Interview prompt (Behavioral & Leadership) You are interviewing for a software engineering role. The interviewer asks a mix of experience-based and hy...