← Google Interview Insights

Google·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jul 2026

Summary

System design round at Google for a software engineer role, centered entirely on designing a calendar product at scale. The conflict detection piece was where things got real fast.

Questions Asked (10)

Q1

Design the event schema and settings for a large-scale calendar product. What fields does an event need, and how do you decide whether to use one schema for everything or separate read and write paths?

System DesignData ModelingTechnical Trade-offs
Author's notes

I started listing fields (title, attendees, time zone, recurrence, reminders, location, video link) and the interviewer let me go for a bit before asking what the conflict check actually needs from all that.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and requirements (e.g., billions of events, global users, low-latency reads). Then propose a core event schema with essential fields, and discuss the trade-offs between a single unified schema versus separate read/write models, considering access patterns, consistency, and performance.

Pro tip: Emphasize that the decision should be driven by access patterns and scale: a single schema simplifies writes but may not optimize reads; separate read/write paths (CQRS) can improve performance but add complexity. Show awareness of Google-scale constraints like Spanner and Bigtable.

1. Clarify Requirements and Scale

Ask about expected scale (number of events, users, QPS), latency requirements, consistency needs, and features (recurrence, sharing, reminders). This sets the context for schema design.

2. Define Core Event Schema

List essential fields: event ID, title, description, start/end time (with timezone), location, organizer, attendees, recurrence rules, reminders, visibility, status, creation/update timestamps, and metadata. Consider extensibility for custom fields.

3. Analyze Access Patterns

Identify common queries: fetching events by user, by time range, by calendar, searching, and updates. Note that reads often outnumber writes and may require different indexing and denormalization.

4. Evaluate Single vs. Separate Read/Write Schemas

Discuss trade-offs: a single schema simplifies writes and consistency but may lead to inefficient reads at scale. Separate read/write paths (e.g., CQRS) allow optimized read models (e.g., denormalized, indexed for queries) and write models (normalized, transactional), but introduce eventual consistency and complexity.

5. Propose a Hybrid Approach and Justify

Recommend a design: use a canonical write schema for transactional integrity, and materialized views or read-optimized stores for queries. Justify based on scale, latency, and consistency requirements, referencing Google technologies like Spanner for writes and Bigtable for reads.

Key Points to Mention

  • Core fields: event ID, title, description, start/end time with timezone, location, organizer, attendees, recurrence rules, reminders, visibility, status, timestamps.
  • Access patterns: reads are typically by user and time range, requiring efficient indexing; writes need transactional consistency for updates and invitations.
  • Single schema pros: simplicity, strong consistency, easier writes. Cons: may not scale for read-heavy workloads, complex queries.
  • Separate read/write pros: optimized performance, scalability, tailored indexes. Cons: eventual consistency, increased complexity, data duplication.
  • CQRS pattern: command query responsibility segregation, with write model for updates and read model for queries, often using event sourcing.
  • Google-scale considerations: use Spanner for globally consistent writes, Bigtable for low-latency reads, and possibly F1 for querying.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How does your system detect scheduling conflicts when a user creates or updates an event? Walk through the exact predicate you use for time-range overlap and how you index for it.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

This is where I fumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's scope (single-user vs. multi-user, time zones, recurrence) and then explain the conflict detection logic using a precise time-range overlap predicate. Describe how you index events to efficiently query for overlaps, and discuss trade-offs between different indexing strategies.

Pro tip: Mention that the overlap predicate must handle edge cases like zero-duration events and inclusive/exclusive boundaries, and that using a composite index on (start_time, end_time) can optimize the query. Also, consider discussing how to handle recurring events and time zones, as these are common pitfalls in scheduling systems.

1. Clarify Requirements and Assumptions

Ask about the system's constraints: single vs. multiple users, time zone handling, recurrence, and expected scale. This ensures your answer is tailored to the actual problem.

2. Define the Overlap Predicate

State the exact condition for two time ranges [s1, e1) and [s2, e2) to overlap: s1 < e2 AND s2 < e1. Explain why this works and how to handle edge cases like zero-duration events.

3. Design the Indexing Strategy

Describe how to index events to efficiently find overlaps. For example, use a composite index on (start_time, end_time) or a spatial index like an interval tree. Discuss trade-offs between different approaches.

4. Walk Through the Query and Detection Process

Explain how a new or updated event triggers a query to find conflicting events using the predicate and index. Mention how to handle updates (e.g., excluding the event being updated).

5. Address Scalability and Edge Cases

Discuss how the solution scales with many events, handles recurring events, time zones, and concurrent updates. Mention any caching or sharding strategies if relevant.

Key Points to Mention

  • Time-range overlap predicate: s1 < e2 AND s2 < e1
  • Composite index on (start_time, end_time) or interval tree for efficient overlap queries
  • Handling of edge cases: zero-duration events, inclusive/exclusive boundaries, time zones
  • Recurring events: expansion or special indexing
  • Concurrency control: locking or optimistic concurrency to prevent race conditions
  • Scalability: sharding by user or time, caching frequent queries

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

When checking conflicts for a multi-attendee event, do you block on any attendee's conflict, only required attendees, or just the organizer? How does your system enforce whichever policy is chosen?

System DesignTechnical Trade-offs
Author's notes

Didn't have a strong answer here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying that the policy is a product decision with trade-offs, then propose a flexible design that supports configurable policies (e.g., organizer-only, required attendees, all attendees). Explain how to enforce the chosen policy through conflict detection logic and data modeling, and discuss how to handle edge cases like optional attendees and recurring events.

Pro tip: Emphasize that the system should be designed to allow policy changes without major refactoring, and mention that you would instrument metrics to understand the impact of the policy on booking success rates and user satisfaction.

1. Clarify requirements and policy options

Ask clarifying questions about the product goals and constraints to determine which policy makes sense. Discuss the trade-offs between strictness (blocking on any conflict) and flexibility (allowing overbooking).

2. Design a configurable policy engine

Propose a system where the conflict-checking policy is configurable per event type or per organizer. This allows different teams or scenarios to choose the appropriate policy without code changes.

3. Implement conflict detection logic

Describe how to efficiently check for conflicts given the chosen policy. For example, query attendees' calendars, filter based on required/optional status, and apply the policy rules.

4. Enforce policy at booking time

Explain how the system enforces the policy when an event is created or updated, including handling race conditions and providing clear feedback to users.

5. Monitor and iterate

Discuss the importance of logging and metrics to evaluate the policy's effectiveness and to inform future adjustments.

Key Points to Mention

  • Trade-offs between strict conflict avoidance and flexibility (e.g., double-booking vs. productivity)
  • Configurability: policy should be a setting, not hard-coded
  • Data model: how to represent attendees (required/optional) and their calendars
  • Efficient conflict detection: indexing, caching, and query optimization
  • Handling edge cases: recurring events, time zones, external attendees
  • User experience: clear error messages and suggestions for alternative times

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How do you handle conflict detection for recurring events, especially when the recurrence is unbounded (e.g., every weekday forever)?

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

Storing RRULE strings and expanding on demand felt right to me, with a materialized horizon for the near future.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what kind of conflicts, how far in advance, and what performance constraints. Then explain that unbounded recurrences cannot be fully materialized, so you need a strategy that computes occurrences on-demand or within a bounded window, using efficient data structures and algorithms to detect overlaps. Finally, discuss trade-offs between precomputation, lazy evaluation, and indexing for scalability.

Pro tip: Mention that you would store recurrence rules in a compact form (e.g., RFC 5545 RRULE) and use a sliding window or bounded horizon for conflict detection, because truly unbounded checks are impossible. Also, highlight the importance of time zone handling and exception dates (EXDATE) as they often cause subtle bugs.

1. Clarify Requirements and Constraints

Ask questions to understand the scope: what types of conflicts (overlap, resource double-booking), how far into the future to check, expected query patterns, and performance/latency requirements.

2. Model Recurrence and Storage

Represent recurring events using a standard rule format (e.g., RRULE) and store exceptions separately. Explain that unbounded recurrences are stored as rules, not as individual instances.

3. Define Conflict Detection Strategy

Describe how to detect conflicts within a bounded time window (e.g., next N days) by expanding occurrences on-demand or using precomputed indexes. For unbounded, emphasize that you only check against a finite horizon or use lazy evaluation.

4. Optimize with Data Structures and Algorithms

Discuss using interval trees, segment trees, or time-based indexes to efficiently query overlapping events. Mention algorithms for expanding recurrences (e.g., iterating by rule) and handling exceptions.

5. Address Scalability and Edge Cases

Talk about scaling to many events/users, handling time zones, daylight saving, and exceptions. Mention caching, sharding, and asynchronous conflict checks if needed.

Key Points to Mention

  • Use of RFC 5545 RRULE for recurrence representation
  • Bounded horizon or sliding window for conflict detection
  • Exception dates (EXDATE) and modified instances (RECURRENCE-ID)
  • Interval trees or segment trees for efficient overlap queries
  • Time zone and daylight saving time handling
  • Trade-offs between precomputation and on-demand expansion

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How do you store and reason about time zones in your event model, particularly for recurring events that cross a daylight saving time change?

System DesignTechnical Trade-offs
Author's notes

Store wall-clock time plus IANA zone name, compute UTC for overlap queries, but trust the wall-clock representation to decide when the meeting 'really' is.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: are events stored as absolute instants or wall-clock times, and how should recurring events behave across DST? Then propose a hybrid model that stores both the local time and the IANA time zone identifier, and explain how to expand recurrences using a time zone-aware library. Finally, discuss trade-offs and edge cases like ambiguous or skipped times.

Pro tip: Emphasize that time zone rules are political and change frequently, so you must use a versioned tz database (like IANA) and never hardcode offsets. Also, mention that for recurring events, you should store the recurrence rule in local time and resolve to UTC at query time to handle DST correctly.

1. Clarify requirements and semantics

Ask whether events are one-time or recurring, whether they should follow the user's local time or a fixed time zone, and how to handle DST transitions (e.g., skip, shift, or duplicate).

2. Choose a storage model

Propose storing the event's start time as a UTC instant plus the original IANA time zone ID and local wall-clock time. For recurring events, store the recurrence rule (e.g., RRULE) in local time with the time zone ID.

3. Expand recurrences with time zone awareness

Explain that recurrence expansion should be done in the event's local time zone using a library like java.time or pytz, then converted to UTC for storage or querying. This ensures DST transitions are handled correctly.

4. Handle DST edge cases

Discuss strategies for ambiguous times (e.g., during fall-back) and non-existent times (e.g., during spring-forward), such as choosing the earlier offset, skipping the event, or shifting it forward.

5. Discuss trade-offs and scalability

Compare storing UTC only vs. local time + zone, and explain why the latter is necessary for recurring events. Mention performance considerations for expanding recurrences at scale.

Key Points to Mention

  • Use IANA time zone identifiers (e.g., America/New_York) instead of fixed offsets.
  • Store both UTC instant and local time + time zone for recurring events.
  • Use a time zone-aware library (e.g., java.time, pytz, moment-timezone) for recurrence expansion.
  • Handle DST transitions: ambiguous times (fall-back) and non-existent times (spring-forward).
  • Keep the tz database updated and versioned to reflect political changes.
  • Consider trade-offs: storage overhead, query complexity, and correctness for global users.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How do you handle concurrent edits to the same calendar or event? What concurrency strategy do you use and why?

System DesignTechnical Trade-offs
Author's notes

Went with optimistic versioning first, which is reasonable for most writes.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, such as the scale, consistency needs, and user experience goals. Then, discuss the trade-offs between different concurrency control strategies (e.g., pessimistic vs. optimistic) and justify your choice based on the scenario. Finally, outline how you would handle conflicts and ensure a seamless user experience.

Pro tip: Demonstrate awareness of real-world calendar systems like Google Calendar by mentioning specific techniques such as operational transformation or conflict-free replicated data types (CRDTs), and how they balance consistency and availability.

1. Clarify Requirements

Ask questions to understand the scale, consistency requirements, and user expectations. For example, is strong consistency required, or is eventual consistency acceptable? How many concurrent edits are expected?

2. Evaluate Concurrency Control Strategies

Compare pessimistic locking (e.g., locking the event during edit) and optimistic concurrency (e.g., versioning with conflict detection). Discuss their trade-offs in terms of latency, throughput, and user experience.

3. Choose and Justify a Strategy

Select a strategy based on the requirements. For example, optimistic concurrency with version numbers is often suitable for calendar apps due to low contention and better user experience. Explain why it fits.

4. Handle Conflicts

Describe how conflicts are detected and resolved. This could include automatic merging (e.g., for non-overlapping fields) or user-driven resolution (e.g., prompting the user to choose which change to keep).

5. Consider Scalability and Edge Cases

Discuss how the solution scales with many users and events, and address edge cases like offline edits, network partitions, and recurring events.

Key Points to Mention

  • Optimistic concurrency control with versioning (e.g., ETags or version numbers) and its benefits for low-contention scenarios.
  • Pessimistic locking and its drawbacks (e.g., reduced concurrency, potential deadlocks) in a calendar context.
  • Conflict resolution techniques: last-write-wins, merge algorithms, or user intervention.
  • Real-world examples: Google Calendar's use of optimistic concurrency and conflict resolution UI.
  • Distributed systems concepts: CAP theorem, consistency models (strong vs. eventual), and CRDTs.
  • User experience considerations: minimizing disruptions, providing clear conflict resolution interfaces, and handling offline edits.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q7

How do you expose conflict information to users who don't have full visibility into another calendar? How do you return busy-block data without leaking private event details?

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

Private events should surface as opaque busy blocks, not with titles or attendees.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the core requirement: expose only free/busy status, never event details. Then propose a design that separates data access from presentation, using a dedicated busy-block API that returns opaque time intervals. Finally, discuss trade-offs around privacy, performance, and consistency.

Pro tip: Emphasize that privacy must be enforced at the data layer, not just the UI, and mention that returning busy blocks with randomized padding or granularity can further protect privacy.

1. Clarify requirements and constraints

Confirm that users need to see only availability (busy/free) without event titles, attendees, or locations. Discuss privacy policies and potential regulatory requirements (e.g., GDPR).

2. Design a dedicated busy-block API

Propose an endpoint that accepts a user ID and time range, and returns a list of busy intervals (start/end timestamps) without any event metadata. Ensure the API enforces access control.

3. Implement privacy-preserving transformations

Apply techniques like rounding times to the nearest 15 minutes, merging adjacent busy blocks, or adding random padding to prevent inference of event details. Consider returning only 'free' slots instead of busy blocks.

4. Address scalability and performance

Discuss caching strategies, rate limiting, and efficient querying of calendar data. Consider precomputing busy blocks for frequent queries.

5. Evaluate trade-offs and alternatives

Compare returning busy blocks vs. free slots, discuss granularity vs. privacy, and mention fallback options like manual sharing or delegated access.

Key Points to Mention

  • Privacy by design: never expose event details, only availability.
  • Data minimization: return only necessary information (busy intervals).
  • Access control: ensure only authorized users can query busy blocks.
  • Granularity trade-off: coarser granularity improves privacy but reduces utility.
  • Caching and precomputation for performance at scale.
  • Compliance with privacy regulations (e.g., GDPR, CCPA).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q8

How do you keep a denormalized availability index consistent with the canonical event store, and how would you detect and repair drift between them?

System DesignData Modeling
Author's notes

Outbox pattern or CDC to propagate writes to the index asynchronously.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's requirements: read patterns, consistency needs, and scale. Then describe a write path that updates the event store and availability index atomically or via a reliable event stream, and a read path that may tolerate staleness. Finally, outline a drift detection mechanism (e.g., periodic reconciliation) and repair strategies (e.g., idempotent backfill).

Pro tip: Emphasize that drift is inevitable in distributed systems, so design for eventual consistency and automated repair rather than trying to prevent all drift. Mention that you would monitor drift metrics and alert on anomalies to catch issues early.

1. Clarify requirements and constraints

Ask about read/write patterns, consistency requirements (strong vs eventual), scale, and latency SLAs. This determines the appropriate consistency model and update strategy.

2. Design the write path for consistency

Describe how updates to the event store propagate to the availability index. Options include synchronous dual-writes (with transactions if possible), change data capture (CDC), or event sourcing with a stream processor. Highlight trade-offs.

3. Design the read path and handle staleness

Explain how reads from the index handle potential staleness. For example, use versioning, read-your-writes via session tokens, or fallback to the event store for critical reads.

4. Detect drift

Propose methods to detect inconsistencies: periodic reconciliation jobs that compare checksums or sample records, monitoring of update lag, and anomaly detection on index metrics.

5. Repair drift

Outline repair strategies: idempotent backfill from the event store, compensating transactions, or automated reconciliation that fixes discrepancies. Ensure repairs are safe and don't cause further inconsistencies.

Key Points to Mention

  • Event sourcing and CQRS patterns
  • Change Data Capture (CDC) for propagating updates
  • Idempotency and exactly-once processing semantics
  • Versioning and optimistic concurrency control
  • Periodic reconciliation and checksum comparison
  • Monitoring and alerting on drift metrics

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q9

How would you add a 'find a time that works for all attendees' feature, and how does the cost scale with the number of attendees and their time zones?

System DesignAlgorithms & Data Structures
Author's notes

Merge free/busy intervals per attendee, intersect across all attendees to find open windows.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a solution that normalizes all attendees' availability into a common time zone (e.g., UTC) and uses interval intersection to find overlapping free slots. Finally, analyze the time and space complexity in terms of the number of attendees (N) and the number of busy intervals per attendee (M), and discuss how time zones affect the data size and computation.

Pro tip: Mention that time zones add a constant factor (at most 24 offsets) but don't change the asymptotic complexity; however, handling DST transitions and half-hour offsets requires careful normalization. Also, consider pre-processing busy intervals by merging overlaps to reduce M.

1. Clarify requirements and constraints

Ask about the number of attendees, expected busy intervals per person, time zone data, and whether we need to consider working hours or preferences. Confirm if the goal is to find any common slot or the best slot.

2. Design data representation and normalization

Represent each attendee's busy times as intervals in UTC. Convert all local times to UTC using time zone offsets, handling DST and non-hour offsets. Optionally, merge overlapping or adjacent busy intervals per attendee to reduce the number of intervals.

3. Algorithm for finding common free slots

Use a sweep-line or interval intersection approach: collect all busy intervals from all attendees, sort them by start time, and then find gaps between merged busy intervals that are free for all. Alternatively, compute the intersection of free intervals by starting with one attendee's free slots and intersecting with each subsequent attendee's free slots.

4. Analyze complexity and scaling

Time complexity: O(N * M log(N * M)) if sorting all intervals, or O(N * M) if using a sweep-line with a priority queue. Space complexity: O(N * M) to store intervals. Time zones add a constant factor (at most 24 offsets) but do not change asymptotic scaling. Discuss how N and M affect performance and potential optimizations like merging intervals.

5. Discuss edge cases and optimizations

Address DST transitions, attendees with no busy intervals, all-day events, and the need for a minimum meeting duration. Suggest optimizations like early termination if a common slot is found, or using a bitset representation for discrete time slots.

Key Points to Mention

  • Normalize all times to a common time zone (e.g., UTC) to simplify interval operations.
  • Use interval intersection or sweep-line algorithm to find overlapping free slots.
  • Time complexity: O(N * M log(N * M)) with sorting, or O(N * M) with sweep-line; space O(N * M).
  • Time zones add a constant factor (at most 24 offsets) but do not change asymptotic complexity.
  • Merge overlapping busy intervals per attendee to reduce M and improve efficiency.
  • Handle DST transitions and non-hour offsets (e.g., 30-minute or 45-minute offsets) carefully.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q10

If double-booking were strictly forbidden for certain resources (like a conference room), how would your design change compared to the advisory conflict model for regular users?

System DesignTechnical Trade-offs
Author's notes

This is where optimistic concurrency breaks down and you need hard serialization.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, contrast the advisory model (which allows conflicts and resolves them socially) with the strict model (which must prevent conflicts at write time). Then, propose a design that enforces atomic booking through a centralized lock or transactional store, and discuss the trade-offs in latency, availability, and user experience.

Pro tip: Emphasize that strict double-booking prevention requires a single source of truth and atomic operations, which often means sacrificing some scalability or availability—be ready to discuss how you'd handle failures without breaking the guarantee.

1. Clarify the difference in requirements

Explain that the advisory model tolerates conflicts and relies on social resolution, while the strict model must guarantee no two bookings overlap for the same resource.

2. Identify the core enforcement mechanism

Propose using a centralized transactional database with ACID guarantees or a distributed lock service (e.g., Chubby, Spanner) to atomically check and reserve time slots.

3. Design the booking flow

Outline a two-phase approach: first, acquire a lock or perform a conditional write (e.g., INSERT with unique constraint on resource+time range); second, confirm the booking and release the lock.

4. Address failure and concurrency

Discuss how to handle lock timeouts, retries, and idempotency to avoid deadlocks or orphaned locks, and ensure the system remains available during failures.

5. Evaluate trade-offs

Compare the strict model's higher consistency and lower flexibility against increased latency, reduced availability, and potential user frustration due to failed bookings.

Key Points to Mention

  • Atomicity and isolation: use transactions or locks to prevent race conditions.
  • Single source of truth: a centralized store or consensus-based system to avoid split-brain.
  • Latency and availability trade-offs: strict enforcement may increase response time and reduce uptime.
  • User experience: immediate feedback vs. potential booking failures and retries.
  • Scalability: sharding by resource ID while maintaining per-resource consistency.
  • Failure handling: timeouts, idempotent operations, and fallback mechanisms.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.