Google Interview Questions and Guide
Algorithmic depth and clean, well-tested code. Expect follow-ups that change constraints mid-problem. System design emphasizes scale and trade-offs.
The Google interview loop
- Recruiter screen
- 1–2 technical phone screens (coding)
- Onsite: 3–4 coding, 1 system design (L5+), 1 Googleyness & leadership
- Hiring committee + team match
Google interview questions
- Design a URL Shortener
- Design a Distributed Rate Limiter
- Design Uber
- Design a Web Crawler
- Design Top-K Trending Videos
- Design Dropbox
- Design YouTube
- Design Google Docs
- Design Search Autocomplete
- Design an Ad Click Aggregator
- Design Yelp (Proximity Search)
- Design Google Calendar
- Design Google Maps
- Design Online Chess
- Design LeetCode
- Design Airbnb
- Design Spotify
- Design Zoom (Video Conferencing)
- Design Instagram
- Design Gmail
- Design Facebook Live Comments
- Design Strava
- Design a Price Tracker
- Design Google News
- Design a Distributed File System
- Design a Real-Time Leaderboard
- Design a Remote Devbox
- Design a Crossword Puzzle Solver
- Design Smart Grid Device Control
- Design a Content Delivery Network (CDN)
- Design a Metrics Monitoring & Alerting System
- Design a Distributed Lock Service
- Design Sora (Text-to-Video)
- Trapping Rain Water
- Container With Most Water
- Majority Element (Boyer–Moore Vote)
- Find the Duplicate Number
- Find the First Occurrence (KMP)
- Best Time to Buy and Sell Stock
- Valid Palindrome
- Valid Palindrome II
- Valid Word Abbreviation
- Merge Sorted Array
- Move Zeroes
- Longest Common Prefix
- Rotate Image
- Spiral Matrix
- Next Permutation
- Set Matrix Zeroes
- Longest Repeating Character Replacement
- Max Consecutive Ones III
- Minimum Size Subarray Sum
- First Missing Positive
- Text Justification
- Remove Duplicates from Sorted Array
- Rotate Array
- Squares of a Sorted Array
- Two Sum II - Input Array Is Sorted
- Zigzag Conversion
- 4Sum
- 3Sum Closest
- Fruit Into Baskets
- Permutation in String
- String Compression
- Reverse Words in a String
- Subarray Product Less Than K
- Game of Life
- Majority Element II
- Remove Element
- Merge Strings Alternately
- Maximum Average Subarray I
- Is Subsequence
- Reverse Vowels of a String
- Maximum Product of Three Numbers
- Remove Duplicates from Sorted Array II
- Increasing Triplet Subsequence
- Frequency of the Most Frequent Element
- Maximum Points You Can Obtain from Cards
- Number of Substrings Containing All Three Characters
- Substring with Concatenation of All Words
- Rotate String
- Longest Substring with At Least K Repeating Characters
- Reverse Pairs
- Find Pivot Index
- Rearrange Array Elements by Sign
- Count Binary Substrings
- Can Make Arithmetic Progression From Sequence
- Find Missing and Repeated Values
- Find All Numbers Disappeared in an Array
- Valid Triangle Number
- Third Maximum Number
- Maximum Sum of Distinct Subarrays With Length K
- Maximum Number of Vowels in a Substring of Given Length
- Shortest Unsorted Continuous Subarray
- Longest Substring with At Most K Distinct Characters
- Longest Mountain in Array
- Sort an Array
- Toeplitz Matrix
- Range Sum Query - Immutable
- Range Sum Query 2D - Immutable
- Product of the Last K Numbers
- Subarray Sum Equals K
- Two Sum
- Longest Consecutive Sequence
- Contiguous Array (Equal 0s and 1s)
- Valid Anagram
- Isomorphic Strings
- Valid Sudoku
- Continuous Subarray Sum
- Subarray Sums Divisible by K
- Happy Number
- Logger Rate Limiter
- Contains Duplicate
- Ransom Note
- Word Pattern
- Design HashMap
- Count Number of Nice Subarrays
- Binary Subarrays With Sum
- LFU Cache
- Intersection of Two Arrays
- Repeated DNA Sequences
- Group Shifted Strings
- Design Underground System
- Find All Duplicates in an Array
- Longest Palindrome
- Analyze User Website Visit Pattern
- Unique Number of Occurrences
- Subarrays with K Different Integers
- Brick Wall
- K-diff Pairs in an Array
- Max Number of K-Sum Pairs
- Jewels and Stones
- Find Common Characters
- Shortest Word Distance
- Shortest Word Distance II
- Sort Array by Increasing Frequency
- Find the Cycle Entry
- Merge K Sorted Lists
- Add Two Numbers
- Swap Nodes in Pairs
- Rotate List
- Odd Even Linked List
- Remove Duplicates from Sorted List II
- Sort List
- Reverse Nodes in k-Group
- Remove Duplicates from Sorted List
- Remove Linked List Elements
- Partition List
- Delete the Middle Node of a Linked List
- Insertion Sort List
- Next Greater Node In Linked List
- Swapping Nodes in a Linked List
- Maximum Twin Sum of a Linked List
- Design Linked List
- Merge Nodes in Between Zeros
- Merge In Between Linked Lists
- Remove Zero Sum Consecutive Nodes from Linked List
- Reverse Nodes in Even Length Groups
- Linked List Components
- Double a Number Represented as a Linked List
- Valid Parentheses
- Min Stack
- Evaluate Reverse Polish Notation
- Next Greater Element (Circular)
- Largest Rectangle in Histogram
- Remove K Digits
- Minimum Remove to Make Valid Parentheses
- Decode String
- Asteroid Collision
- Simplify Path
- Basic Calculator
- Longest Valid Parentheses
- Sum of Subarray Minimums
- Next Greater Element I
- Final Prices With a Special Discount in a Shop
- Remove All Adjacent Duplicates in String
- Implement Queue using Stacks
- Minimum Add to Make Parentheses Valid
- 132 Pattern
- Remove Duplicate Letters
- Maximal Rectangle
- Exclusive Time of Functions
- Car Fleet
- Buildings With an Ocean View
- Backspace String Compare
- Baseball Game
- Number of Visible People in a Queue
- Sum of Subarray Ranges
- Maximum Width Ramp
- Remove Outermost Parentheses
- Maximum Nesting Depth of the Parentheses
- Design a Stack With Increment Operation
- Maximum Frequency Stack
- Score of Parentheses
- Using a Robot to Print the Lexicographically Smallest String
- Sliding Window Maximum
- Rotting Oranges (Multi-source BFS)
- Distance to Nearest Zero (01 Matrix)
- Open the Lock
- Number of Recent Calls
- Shortest Subarray With Sum at Least K
- Design Hit Counter
- Design Circular Queue
- Shortest Path in Binary Matrix
- Walls and Gates
- Longest Subarray With Absolute Diff ≤ Limit
- Bus Routes
- Moving Average from Data Stream
- Implement Stack using Queues
- First Unique Number
- Jump Game VII
- Shortest Path in a Grid with Obstacles Elimination
- Number of Students Unable to Eat Lunch
- Time Needed to Buy Tickets
- Dota2 Senate
- Snakes and Ladders
- Minimum Knight Moves
- The Maze
- Shortest Distance from All Buildings
- Minimum Genetic Mutation
- Shortest Path to Get All Keys
- Find the Safest Path in a Grid
- Continuous Subarrays
- Count Subarrays With Fixed Bounds
- Find Median from Data Stream
- Last Stone Weight
- IPO: Maximize Capital
- Single-Threaded CPU Scheduling
- Top K Frequent Words
- Sort Characters by Frequency
- Kth Smallest Element in a Sorted Matrix
- Furthest Building You Can Reach
- Maximum Number of Events That Can Be Attended
- Meeting Rooms III
- Minimum Number of Refueling Stops
- Smallest Range Covering Elements from K Lists
- Design Twitter
- Seat Reservation Manager
- Total Cost to Hire K Workers
- Process Tasks Using Servers
- Find K Pairs with Smallest Sums
- Ugly Number II
- Minimum Cost to Hire K Workers
- Maximum Performance of a Team
- Design A Leaderboard
- Exam Room
- K-th Smallest Prime Fraction
- Stock Price Fluctuation
- Design Task Manager
- Find Score of an Array After Marking All Elements
- Maximal Score After Applying K Operations
- Number of Orders in the Backlog
- Minimum Eating Speed
- Search Insert Position (Lower Bound)
- Capacity to Ship Packages Within D Days
- Find a Peak Element
- Split Array Largest Sum
- Median of Two Sorted Arrays
- Search a 2D Matrix
- Sqrt(x)
- Single Element in a Sorted Array
- Kth Missing Positive Number
- Find K Closest Elements
- Minimum Number of Days to Make m Bouquets
- Search a 2D Matrix II
- Peak Index in a Mountain Array
- Search in Rotated Sorted Array II
- Find the Smallest Divisor Given a Threshold
- Snapshot Array
- Valid Perfect Square
- Magnetic Force Between Two Balls
- H-Index II
- Find a Peak Element II
- Heaters
- Arranging Coins
- Maximum Candies Allocated to K Children
- Kth Smallest Number in Multiplication Table
- Find K-th Smallest Pair Distance
- Find Smallest Letter Greater Than Target
- Count Negative Numbers in a Sorted Matrix
- Successful Pairs of Spells and Potions
- Minimum Time to Complete Trips
- Minimized Maximum of Products Distributed to Any Store
- Minimum Speed to Arrive on Time
- Invert a Binary Tree
- Diameter of a Binary Tree
- Binary Tree Maximum Path Sum
- Construct a Tree From Preorder and Inorder
- House Robber III (Tree DP)
- Same Tree
- Symmetric Tree
- Subtree of Another Tree
- Binary Tree Zigzag Level Order Traversal
- Binary Tree Vertical Order Traversal
- All Nodes Distance K in Binary Tree
- Sum Root to Leaf Numbers
- Path Sum III
- Maximum Width of Binary Tree
- Flatten Binary Tree to Linked List
- Amount of Time for Binary Tree to Be Infected
- Boundary of Binary Tree
- Step-By-Step Directions From a Binary Tree Node to Another
- Vertical Order Traversal of a Binary Tree
- Count Good Nodes in Binary Tree
- Find Leaves of Binary Tree
- Binary Tree Cameras
- Binary Tree Paths
- Minimum Depth of Binary Tree
- Path Sum
- Count Complete Tree Nodes
- Create Binary Tree From Descriptions
- Count Nodes Equal to Average of Subtree
- Cousins in Binary Tree
- Maximum Difference Between Node and Ancestor
- Longest ZigZag Path in a Binary Tree
- Binary Tree Preorder Traversal
- Sum of Left Leaves
- Merge Two Binary Trees
- Find Largest Value in Each Tree Row
- Check Completeness of a Binary Tree
- Construct Binary Tree from Inorder and Postorder Traversal
- Maximum Level Sum of a Binary Tree
- Binary Tree Tilt
- Kth Smallest Element in a BST
- Range Sum of a BST
- Two Sum IV - Input is a BST
- Closest Binary Search Tree Value
- Trim a Binary Search Tree
- Inorder Successor in BST
- Recover Binary Search Tree
- Convert Sorted List to Binary Search Tree
- Convert BST to Greater Tree
- Minimum Absolute Difference in BST
- Closest Binary Search Tree Value II
- Balance a Binary Search Tree
- Unique Binary Search Trees
- Construct Binary Search Tree from Preorder Traversal
- Increasing Order Search Tree
- Find Mode in Binary Search Tree
- All Elements in Two Binary Search Trees
- Largest BST Subtree
- Count of Smaller Numbers After Self
- Two Sum BSTs
- Verify Preorder Sequence in Binary Search Tree
- Maximum Sum BST in Binary Tree
- Closest Nodes Queries in a Binary Search Tree
- Contains Duplicate III
- Number of Islands
- Network Delay Time
- Accounts Merge
- Number of Provinces (Connected Components)
- Redundant Connection
- Graph Valid Tree
- Word Ladder
- Cheapest Flights Within K Stops (Bellman–Ford)
- City With the Fewest Reachable Neighbors (Floyd–Warshall)
- Min Cost to Connect All Points (MST)
- Path With Minimum Effort (Dijkstra)
- Pacific Atlantic Water Flow
- Is Graph Bipartite?
- Course Schedule II
- Max Area of Island
- Flood Fill
- Surrounded Regions
- Number of Connected Components in an Undirected Graph
- Making A Large Island
- Reconstruct Itinerary
- Alien Dictionary
- Keys and Rooms
- Find Eventual Safe States
- Possible Bipartition
- Swim in Rising Water
- The Earliest Moment When Everyone Become Friends
- Parallel Courses III
- Number of Islands II
- Minimum Height Trees
- Find if Path Exists in Graph
- All Paths From Source to Target
- Most Stones Removed with Same Row or Column
- Critical Connections in a Network
- Shortest Bridge
- Reorder Routes to Make All Paths Lead to the City Zero
- Island Perimeter
- Detonate the Maximum Bombs
- Find All Possible Recipes from Given Supplies
- Parallel Courses
- Minimum Fuel Cost to Report to the Capital
- Detect Cycles in 2D Grid
- Find the Town Judge
- Minimize Malware Spread
- Count Unreachable Pairs of Nodes in an Undirected Graph
- Coin Change
- Longest Increasing Subsequence
- Word Break
- Edit Distance
- Climbing Stairs
- House Robber
- Decode Ways
- Unique Paths
- Minimum Path Sum
- Longest Common Subsequence
- 0/1 Knapsack
- Coin Change II (Unbounded Knapsack)
- Target Sum
- Matrix Chain Multiplication
- Burst Balloons
- Palindrome Partitioning II (Min Cuts)
- Best Time to Buy and Sell Stock With Cooldown
- Best Time to Buy and Sell Stock IV (k Transactions)
- Maximum Product Subarray
- Palindromic Substrings
- House Robber II
- Unique Paths II
- Maximal Square
- Interleaving String
- Regular Expression Matching
- Maximum Profit in Job Scheduling
- Longest Increasing Path in a Matrix
- Min Cost Climbing Stairs
- Pascal's Triangle
- Triangle
- Perfect Squares
- Minimum Cost For Tickets
- Predict the Winner
- Maximum Sum Circular Subarray
- Wildcard Matching
- Distinct Subsequences
- Russian Doll Envelopes
- Best Time to Buy and Sell Stock III
- Best Time to Buy and Sell Stock with Transaction Fee
- Combination Sum IV
- Number of Longest Increasing Subsequence
- Minimum Falling Path Sum
- Dungeon Game
- Frog Jump
- Integer Break
- Partition Array for Maximum Sum
- Minimum Difficulty of a Job Schedule
- Minimum Cost to Cut a Stick
- Count Square Submatrices with All Ones
- Domino and Tromino Tiling
- Cherry Pickup
- Longest String Chain
- Number of Ways to Form a Target String Given a Dictionary
- Painting the Walls
- New 21 Game
- Stone Game III
- Maximum Sum of 3 Non-Overlapping Subarrays
- Combinations
- Generate Parentheses
- Letter Combinations of a Phone Number
- Subsets II
- Combination Sum II
- Permutations II
- Palindrome Partitioning
- Restore IP Addresses
- Word Break II
- Expression Add Operators
- Subsets
- Combination Sum III
- Letter Case Permutation
- Matchsticks to Square
- Remove Invalid Parentheses
- Word Ladder II
- 24 Game
- Beautiful Arrangement
- Path with Maximum Gold
- Maximum Length of a Concatenated String with Unique Characters
- Generalized Abbreviation
- Factor Combinations
- Optimal Account Balancing
- Unique Paths III
- N-Queens II
- Different Ways to Add Parentheses
- The k-th Lexicographical String of All Happy Strings of Length n
- Shopping Offers
- Jump Game II (Minimum Jumps)
- Gas Station
- Partition Labels
- Fractional Knapsack
- Minimum Cost to Connect Sticks (Huffman)
- Candy
- Activity Selection (Max Meetings in One Room)
- Best Time to Buy and Sell Stock II
- Can Place Flowers
- Valid Parenthesis String
- Largest Number
- Boats to Save People
- Hand of Straights
- Maximum Swap
- Lemonade Change
- Assign Cookies
- Two City Scheduling
- Queue Reconstruction by Height
- Minimum Deletions to Make Character Frequencies Unique
- Maximum Units on a Truck
- Maximize Distance to Closest Person
- Reduce Array Size to The Half
- Wiggle Subsequence
- Bag of Tokens
- Minimum Number of Taps to Open to Water a Garden
- Broken Calculator
- Minimum Initial Energy to Finish Tasks
- Maximum Ice Cream Bars
- Maximum Element After Decreasing and Rearranging
- Minimum Number of Increments on Subarrays to Form a Target Array
- Move Pieces to Obtain a String
- Partitioning Into Minimum Number Of Deci-Binary Numbers
- Merge Overlapping Intervals
- Minimum Meeting Rooms
- Insert Interval
- Non-overlapping Intervals
- Car Pooling (Sweep Line)
- My Calendar I
- Summary Ranges
- Remove Covered Intervals
- My Calendar II
- Data Stream as Disjoint Intervals
- Minimum Interval to Include Each Query
- My Calendar III
- Video Stitching
- Missing Ranges
- Meeting Scheduler
- Count Days Without Meetings
- Range Module
- Divide Intervals Into Minimum Number of Groups
- Find Right Interval
- Minimum Time Difference
- The Skyline Problem
- Employee Free Time
- Brightest Position on Street
- Remove Interval
- Points That Intersect With Cars
- Implement a Trie (Prefix Tree)
- Design Add and Search Words (Wildcards)
- Search Suggestions (Autocomplete)
- Maximum XOR of Two Numbers
- Longest Word in Dictionary
- Map Sum Pairs
- Design Search Autocomplete System
- Concatenated Words
- Stream of Characters
- Palindrome Pairs
- Prefix and Suffix Search
- Implement Magic Dictionary
- Short Encoding of Words
- Sum of Prefix Scores of Strings
- Find the Length of the Longest Common Prefix
- Lexicographical Numbers
- Remove Sub-Folders from the Filesystem
- Words Within Two Edits of Dictionary
- Index Pairs of a String
- Count Prefix and Suffix Pairs
- Single Number (XOR)
- Counting Bits
- Power of Two
- Set Mismatch (Duplicate and Missing)
- Partition to K Equal Sum Subsets (Bitmask DP)
- Add Binary
- Single Number II
- Single Number III
- Bitwise AND of Numbers Range
- Total Hamming Distance
- Find the Difference
- Minimum Flips to Make a OR b Equal to c
- Gray Code
- Maximum Product of Word Lengths
- Divide Two Integers
- UTF-8 Validation
- Reverse Bits
- Number Complement
- Binary Watch
- Minimum Bit Flips to Convert Number
- Concatenation of Consecutive Binary Numbers
- Bitwise ORs of Subarrays
- Binary Gap
- Find Kth Bit in Nth Binary String
- XOR Queries of a Subarray
- Number of Steps to Reduce a Number to Zero
- Find The Original Array of Prefix Xor
- Count Primes (Sieve of Eratosthenes)
- Greatest Common Divisor of Strings
- Pow(x, n) — Fast Exponentiation
- Modular Exponentiation
- Binomial Coefficient nCr mod 10⁹+7
- Permutation Sequence (k-th Permutation)
- Nth Magical Number (LCM + Binary Search)
- Reservoir Sampling
- Palindrome Number
- Reverse Integer
- Roman to Integer
- Integer to Roman
- String to Integer (atoi)
- Multiply Strings
- Excel Sheet Column Title
- Fraction to Recurring Decimal
- Integer to English Words
- Angle Between Hands of a Clock
- Plus One
- Add Strings
- Fizz Buzz
- Count and Say
- Bulb Switcher
- Valid Number
- Max Points on a Line
- Robot Bounded In Circle
- Sequential Digits
- Power of Three
- Ugly Number
- Add Digits
- Perfect Number
- Sum of Square Numbers
- Rotate Function
- Count Good Numbers
- Number of Digit One
- Excel Sheet Column Number
- Nth Digit
- Factorial Trailing Zeroes
- Water and Jug Problem
- Nim Game
- The kth Factor of n
- Count Numbers with Unique Digits
- Rectangle Area
- Base 7
- Find the Closest Palindrome
- Design a Parking Lot
- Design a Vending Machine
- Design the Snake Game
- Design Connect Four
- Design a Chess Game
- Design a Deck of Cards for Blackjack
- Design Tic-Tac-Toe
- Design Splitwise
- Design a Meeting Room Scheduler
- Design a Text Editor with Undo and Redo
- Design a Spreadsheet with Formulas
- Design a Logging Framework
- Tell me about yourself
- Tell me about a conflict with a coworker
- Tell me about a time you failed
- Walk me through your most impactful project
- Tell me about a time you worked with ambiguity
- Tell me about critical feedback you received
- Tell me about a time you helped someone grow
- Why are you leaving your current role?
- What are you looking for in your next team?
- Tell me about a time you took ownership beyond your role
- Tell me about a problem you noticed that nobody else was addressing
- Tell me about a project you drove from idea to launch
- Tell me about a time you had to compromise
- Tell me about delivering a project across multiple teams
- Tell me about a time you led without formal authority
- Tell me about a time you convinced others to adopt your idea
- Tell me about a time you improved how your team works
- Tell me about working with an underperforming teammate
- Tell me about a decision you made with incomplete information
- Tell me about a difficult technical trade-off you made
- Tell me about a time you had to change direction mid-project
- Tell me about a time you had to cut scope
- Tell me about a mistake that affected others
- What is a weakness you're working on?
- Tell me about a production incident you handled
- Tell me about the hardest bug you've debugged
- Tell me about a time you had to learn something new quickly
- Tell me about a time you made the case for paying down tech debt
- What questions do you have for me?
- Tell me about a time you simplified something complex
- Tell me about a time you had to earn the trust of a skeptical team
- Tell me about a judgment call where others disagreed with you
- Tell me about something you learned outside your job that made you better at it
- Tell me about raising the bar when hiring or developing people
- Your team is split on a technical direction. What do you do?
- Tell me about a time you made sure every voice on your team was heard
- Tell me about a time you advocated for users
- Tell me about a time you kept going on a problem that seemed stuck
- Tell me about a time you changed your mind
- Tell me about a time you made someone feel they belonged
- Teach me something you recently learned