Google Array Coding Interview Questions
359 array coding problems are tagged as asked at Google in interviews and online assessments reported by candidates. By difficulty they split into 103 basic, 181 intermediate and 75 advanced. The topics they most often combine with are Hash Table, Sliding Window, Sorting, Dynamic Programming.
Reported questions change over time and are not a guarantee of what you will be asked, so use the list to see which patterns Google tends to test. For each problem, practise explaining your approach, its time and space cost and the edge cases before you write the code; every problem opens in an editor that runs your code against test cases.
Coding problems
- Two Sum (Basic)
- Contains Duplicate (Basic)
- Best Time to Buy and Sell Stock (Basic)
- Maximum Subarray (Intermediate)
- Product of Array Except Self (Intermediate)
- Move Zeroes (Basic)
- Search Insert Position (Basic)
- Rotate Array (Intermediate)
- House Robber (Intermediate)
- Coin Change (Intermediate)
- Longest Increasing Subsequence (Advanced)
- 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)
- 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)
- Min Cost Climbing Stairs (Intermediate)
- Coin Change Ways (Advanced)
- Target Sum (Advanced)
- Plus One (Basic)
- Sort Array by Parity (Basic)
- Search in a Rotated Sorted Array (Advanced)
- Minimum in a Rotated Sorted Array (Intermediate)
- Peak Index in a Mountain Array (Intermediate)
- Concatenation of an Array (Basic)
- Decode XORed Array (Basic)
- Find All Missing Numbers (Basic)
- Merge Intervals (Intermediate)
- Insert an Interval (Intermediate)
- Candy Distribution (Advanced)
- Best Sightseeing Pair (Intermediate)
- Max Chunks to Make Sorted (Advanced)
- Count Negative Numbers (Basic)
- Maximum Units on a Truck (Intermediate)
- Last Stone Weight (Intermediate)
- Kth Missing Positive Number (Basic)
- Sum of Subarray Minimums (Advanced)
- Maximum Width Ramp (Advanced)
- Buy Two Chocolates (Basic)
- Divide Array Into Equal Pairs (Basic)
- Maximum Increasing Difference (Basic)
- Unique Number of Occurrences (Basic)
- Largest Perimeter Triangle (Basic)
- Subarrays Divisible by K (Intermediate)
- Fruit Into Two Baskets (Intermediate)
- Maximum Points From Cards (Intermediate)
- Subarrays With Product Less Than K (Intermediate)
- Longest Mountain Subarray (Intermediate)
- Maximum Product of Three (Basic)
- Count Numbers With Even Digits (Basic)
- Arithmetic Slices (Intermediate)
- Minimum Time to Visit All Points (Basic)
- Find the Town Judge (Basic)
- Maximum Ice Cream Bars (Basic)
- Kth Smallest Pair Distance (Basic)
- Find K Closest Elements (Intermediate)
- Maximum Gap After Sorting (Intermediate)
- Maximum Events Attended (Intermediate)
- Minimum Cost to Merge Stones (Advanced)
- Minimum Swaps to Make Sequences Increasing (Intermediate)
- Count Subarrays With Fixed Bounds (Intermediate)
- Minimum Time to Complete Trips (Intermediate)
- Longest Harmonious Subsequence (Basic)
- Minimum Edge Reversals Per Node (Intermediate)
Related
- Google coding interview questions
- Array problems
- Google basic problems
- Google intermediate problems
- Google advanced problems
- Company interview roadmaps
- All interview guides
Frequently asked questions
How should I use the Google problem list?
Start with the basic problems, then the intermediate and advanced ones, and note which topics repeat. Solve each under a timer, then read the explanation.
Are these the exact Google interview questions?
They are problems candidates reported being asked. Companies rotate questions, so use them to learn the patterns, not to predict the exact question.