Google Behavioral + Coding Interview Prep
Advertisement
Google Interview Structure
Typical onsite (L4/L5):
- 2x Coding rounds (45 min each)
- 1x System Design (45-60 min, L5+)
- 1x Behavioral / Googleyness (45 min)
- 1x General cognitive ability (via coding)
What "Googleyness" Means
Google evaluates candidates on:
- Comfort with ambiguity — Can you make progress with vague requirements?
- Emergent leadership — Do you naturally step up without a title?
- Collaboration — Do you make the team better?
- Fun / passion — Are you excited about hard problems?
Questions to expect:
- "Tell me about a time you had to convince people to adopt your approach."
- "Describe a situation where the requirements changed mid-project."
- "What would you work on if you joined Google?"
- "Tell me about a project you're proud of that others didn't value."
Coding Expectations at Google
Google expects you to:
- Clarify before coding — always ask about constraints
- Discuss multiple approaches — show breadth of knowledge
- Write clean modular code — functions, clear names
- Derive complexity proactively — don't wait to be asked
- Test thoroughly — write test cases as part of solution
Sample Google-style problem walkthrough:
Problem: "Given a list of meeting times, find minimum conference rooms needed."
Step 1: Clarify
"Are meetings represented as [start, end]? Can they overlap at exact endpoints?"
Step 2: Approach
"Two approaches:
1. Min-heap of end times — O(n log n)
2. Event sweep with +1/-1 — O(n log n)
I'll use the heap approach — more intuitive."
Step 3: Code
import heapq
def minMeetingRooms(intervals):
intervals.sort()
heap = []
for start, end in intervals:
if heap and heap[0] <= start:
heapq.heapreplace(heap, end)
else:
heapq.heappush(heap, end)
return len(heap)
Step 4: Test
"Input: [[0,30],[5,10],[15,20]]
After [0,30]: heap=[30]
After [5,10]: no room free (30>5), heap=[10,30]
After [15,20]: [10]<=15, replace: heap=[20,30]
Return 2. Correct."
Step 5: Complexity
"O(n log n) for sort + O(n log k) for heap ops where k <= n.
Space: O(n) for heap."
Google Coding Rubric
| Dimension | What They Look For |
|---|---|
| Problem solving | Gets to optimal without too many hints |
| Coding | Clean, correct, minimal bugs |
| Verification | Proactively tests with examples |
| Communication | Explains reasoning throughout |
| Analysis | States correct complexity |
Prepare These Google-Favourite Topics
Ranked by frequency:
- Graph BFS/DFS (islands, paths, topological)
- Dynamic programming (intervals, 2D, memo)
- Sliding window / two pointers
- Binary search on answer
- String manipulation
- Design questions (LRU, Trie)
Advertisement