Google Behavioral + Coding Interview Prep

Sanjeev SharmaSanjeev Sharma
3 min read

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:

  1. Comfort with ambiguity — Can you make progress with vague requirements?
  2. Emergent leadership — Do you naturally step up without a title?
  3. Collaboration — Do you make the team better?
  4. 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:

  1. Clarify before coding — always ask about constraints
  2. Discuss multiple approaches — show breadth of knowledge
  3. Write clean modular code — functions, clear names
  4. Derive complexity proactively — don't wait to be asked
  5. 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/-1O(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

DimensionWhat They Look For
Problem solvingGets to optimal without too many hints
CodingClean, correct, minimal bugs
VerificationProactively tests with examples
CommunicationExplains reasoning throughout
AnalysisStates correct complexity

Prepare These Google-Favourite Topics

Ranked by frequency:

  1. Graph BFS/DFS (islands, paths, topological)
  2. Dynamic programming (intervals, 2D, memo)
  3. Sliding window / two pointers
  4. Binary search on answer
  5. String manipulation
  6. Design questions (LRU, Trie)

Advertisement

Sanjeev Sharma

Written by

Sanjeev Sharma

Full Stack Engineer · E-mopro