Mock Week 4 — Full Company Simulation (Google, Meta, Amazon)

Sanjeev SharmaSanjeev Sharma
3 min read

Advertisement

Week 4 — Company Simulation

Pick your target company and run the corresponding simulation.


Google Simulation (45 min per round)

Round 1: Coding

  • Problem: Implement a text justification algorithm
  • Expectation: Clean code, handle edge cases (last line, single word)
  • Follow-up: "How does this scale if words are streamed?"

Round 2: Coding + Algo

  • Problem: Find all anagram indices in a string
  • Expectation: Sliding window with character frequency, O(n)
  • Follow-up: "What if the pattern could contain wildcards?"

Google Evaluation Criteria:

  1. General coding ability — clean, correct code
  2. Algorithm knowledge — identify optimal approach
  3. Communication — explain reasoning clearly
  4. Testing — proactively handle edge cases

Google-specific tips:

  • Always ask: "Are there any constraints on input size?"
  • They like when you discuss multiple approaches before picking one
  • Write helper functions instead of one long function
  • Say complexity before they ask

Meta Simulation (35 min per round, 2 rounds)

Round 1: Product Sense + Coding

  • Problem: Implement a news feed with pagination
  • Expectation: Heap-based merge, cursor-based pagination
  • Follow-up: "How would you handle real-time updates?"

Round 2: System Design Lite + Coding

  • Problem: Design a simplified version of Messenger
  • Coding portion: Implement message deduplication
  • Expectation: HashMap with message ID + timestamp

Meta Evaluation Criteria:

  1. Problem-solving speed — they value efficiency
  2. Code quality — no bugs on first submission ideally
  3. Communication — clear and direct
  4. Impact mindset — "What would this look like at 1B users?"

Meta-specific tips:

  • Get to working code fast — optimize after
  • They appreciate when you note trade-offs explicitly
  • Favour simple elegant solutions over clever complex ones
  • Think out loud about scale

Amazon Simulation (45 min: 30 coding + 15 behavioral)

Coding Problem: Design a Rate Limiter

Token bucket approach:

import time
from collections import defaultdict

class RateLimiter:
    def __init__(self, capacity, refill_rate):
        self.capacity = capacity
        self.rate = refill_rate
        self.tokens = defaultdict(lambda: capacity)
        self.last_refill = defaultdict(time.time)

    def allow(self, user_id):
        now = time.time()
        elapsed = now - self.last_refill[user_id]
        self.tokens[user_id] = min(
            self.capacity,
            self.tokens[user_id] + elapsed * self.rate
        )
        self.last_refill[user_id] = now
        if self.tokens[user_id] >= 1:
            self.tokens[user_id] -= 1
            return True
        return False

Behavioral question (15 min): "Tell me about a time you had to make a decision with incomplete data."

LP alignment: Bias for Action + Are Right, A Lot

Amazon Evaluation Criteria:

  1. Correctness — does it work for all cases?
  2. Leadership Principles — every answer mapped to an LP
  3. Scalability thinking — mention edge cases at scale
  4. Ownership — "I would be responsible for monitoring this..."

Simulation Debrief Template

After each simulation, score yourself:

Company: ___  Date: ___
Problem solved correctly: Y / N
Time taken: ___ / 45 min
Complexity stated correctly: Y / N
Edge cases handled: Y / N
Communication score (1-5): ___
One thing done well: ___
One thing to improve: ___

Advertisement

Sanjeev Sharma

Written by

Sanjeev Sharma

Full Stack Engineer · E-mopro