Google SDE-2 Interview Guide
These are coding problems that candidates have reported from Google interviews, ordered so you can start with the ones that come up most. Google tends to give a hard problem with follow-ups, so practise explaining your complexity and what you would change if the input were ten times larger.
Treat the list as practice for the patterns, not a script: interviewers change the numbers and the story, and they care more about how you reason out loud than about a memorised answer.
Coding problems
- Two Sum (Basic)
- Contains Duplicate (Basic)
- Best Time to Buy and Sell Stock (Basic)
- Maximum Subarray (Intermediate)
- Valid Parentheses (Basic)
- Longest Substring Without Repeats (Intermediate)
- Product of Array Except Self (Intermediate)
- Move Zeroes (Basic)
- Search Insert Position (Basic)
- Rotate Array (Intermediate)
- Climbing Stairs (Basic)
- House Robber (Intermediate)
- Coin Change (Intermediate)
- Longest Increasing Subsequence (Advanced)
- Reverse String (Basic)
- First Unique Character (Basic)
- Valid Palindrome (Basic)
- Kth Largest Element (Intermediate)
- Single Number (Basic)
- Majority Element (Basic)
- Missing Number (Basic)
- Intersection of Two Arrays (Basic)
- Two Sum in a Sorted Array (Basic)
- Minimum Size Subarray Sum (Intermediate)
- Longest Consecutive Sequence (Intermediate)
- Subarray Sum Equals K (Intermediate)
- Container With Most Water (Intermediate)
- Trapping Rain Water (Advanced)
- Decode Ways (Intermediate)
- Longest Palindromic Substring (Intermediate)
- Valid Anagram (Basic)
- Ransom Note (Basic)
- Power of Two (Basic)
- Number of One Bits (Basic)
- Happy Number (Intermediate)
- Fibonacci Number (Basic)
- Sort Colors (Basic)
- Remove Element (Basic)
- Third Maximum Number (Basic)
- Max Consecutive Ones (Basic)
- Find Pivot Index (Basic)
- Running Sum of Array (Basic)
- Squares of a Sorted Array (Basic)
- Largest Rectangle in Histogram (Advanced)
- Daily Temperatures (Intermediate)
- Valid Mountain Array (Basic)
- Repeated Substring Pattern (Intermediate)
- Reverse Words in a String (Basic)
- Count and Say (Intermediate)
- Reverse Vowels of a String (Basic)
- Integer to Roman (Intermediate)
- Roman to Integer (Intermediate)
- Excel Column Number (Basic)
- Add Binary (Basic)
- Power of Three (Basic)
- Count Primes (Intermediate)
- Length of Last Word (Basic)
- Counting Bits (Intermediate)
- Power of Four (Basic)
- Min Cost Climbing Stairs (Intermediate)
Related
- Company interview roadmaps
- System design interview questions
- SDE-2 preparation plan
- Solo system design practice, scored out of 10
Frequently asked questions
How many coding rounds does a Google SDE-2 interview have?
Usually two to four coding rounds, a system design round for experienced candidates, and a behavioral round. The exact loop varies by team and level.
Which topics come up most?
Arrays and strings, graphs and trees, dynamic programming, and a lot of problems that need a clever use of a hash map or two pointers.