Google Counting Coding Interview Questions
42 counting coding problems are tagged as asked at Google in interviews and online assessments reported by candidates. By difficulty they split into 14 basic, 23 intermediate and 5 advanced. The topics they most often combine with are Array, String, Hash Table, Math.
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
- Count and Say (Intermediate)
- Count Primes (Intermediate)
- Counting Bits (Intermediate)
- Sort Characters by Frequency (Intermediate)
- Count Negative Numbers (Basic)
- Minimum Deletions for Unique Frequencies (Intermediate)
- Unique Number of Occurrences (Basic)
- Count Numbers With Even Digits (Basic)
- Count Palindromic Substrings (Intermediate)
- Count Unique Binary Search Trees (Basic)
- Count Subarrays With Fixed Bounds (Intermediate)
- Count Numbers With Unique Digits (Intermediate)
- Counting Bits (Basic)
- Count Distinct Islands Shapes (Basic)
- Count Subarrays With Median K (Basic)
- Count Good Nodes in Binary Tree (Intermediate)
- Count Complete Tree Nodes (Intermediate)
- Count Univalue Subtrees (Intermediate)
- Count Sub Islands (Intermediate)
- Count Ways to Distribute Candies (Intermediate)
- Count Sorted Vowel Strings (Basic)
- Count Ways to Build Good Strings (Intermediate)
- Count Special Subsequences (Advanced)
- Word Search II Count (Advanced)
- Count Binary Substrings (Basic)
- Maximum Occurrences of a Substring (Intermediate)
- N-Queens Count (Advanced)
- Count Number of Teams (Intermediate)
- Count Collisions on a Road (Intermediate)
- Count the Number of Consistent Strings (Basic)
- Count Servers That Communicate (Intermediate)
- Count Unguarded Cells (Intermediate)
- Count the Number of Ideal Arrays (Advanced)
- Count Submatrices With All Ones (Intermediate)
- Count Prefixes of a Given String (Basic)
- Occurrences After Bigram (Basic)
- Count Items Matching a Rule (Basic)
- Count the Number of Fair Pairs (Intermediate)
- Count Number of Bad Pairs (Intermediate)
- Maximum Frequency Stack (Advanced)
- Sort Array by Increasing Frequency (Basic)
- Count Subarrays With Score Less Than K (Intermediate)
Related
- Google coding interview questions
- Counting 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.