← Ramp Interview Insights

Ramp·Software Engineer·Onsite - System Design / Architecture·Intermediate

IntermediatePrefer not to say
Apr 2026

Summary

Did a system design-style coding round at Ramp for a software engineer role where they asked me to build a small calendar app from scratch. More nuanced than it sounds, lots of clarifying questions to work through before writing a single line.

Questions Asked (5)

Q1

Design and implement a small calendar application that supports creating, editing, and deleting events, with clean state management and unit tests.

System DesignData ModelingTechnical Trade-offs
Author's notes

I jumped straight into coding and only realized halfway through that I hadn't asked whether overlapping events were allowed.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline a simple data model and state management strategy. Walk through the core CRUD operations and how you would test them, emphasizing trade-offs and edge cases.

Pro tip: Focus on demonstrating clean separation of concerns and testability; mention how you would handle time zones and recurring events as potential extensions, showing foresight without overcomplicating.

1. Clarify Requirements

Ask questions to understand scope: single user or multi-user? Recurring events? Time zones? Persistence? This ensures you build the right thing.

2. Design Data Model

Define an Event entity with fields like id, title, start, end, description. Consider using immutable data structures for easier state management.

3. State Management Strategy

Choose a pattern (e.g., Redux, MobX, or simple observer) to manage events. Emphasize unidirectional data flow and pure functions for updates.

4. Implement CRUD Operations

Describe how to create, edit, and delete events. Discuss optimistic updates, validation, and conflict resolution if applicable.

5. Testing Approach

Outline unit tests for reducers/actions and components. Use mocking for time and dependencies. Cover edge cases like overlapping events and invalid inputs.

Key Points to Mention

  • Immutable state updates to avoid side effects and simplify testing
  • Separation of concerns: UI, state management, and business logic
  • Handling time zones and date formatting correctly
  • Validation and error handling for event creation/editing
  • Testability: pure functions, dependency injection, and mocking
  • Scalability considerations: pagination, lazy loading, and indexing

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

Q2

How would you redesign the event model to support recurring events?

System DesignData Modeling
Author's notes

Talked about storing a recurrence rule on the event and generating instances lazily.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints of recurring events, then propose a data model that separates the recurrence pattern from individual event instances. Discuss trade-offs between storing materialized instances versus generating them on the fly, and how to handle exceptions and modifications.

Pro tip: Demonstrate awareness of real-world complexities like time zones, DST, and infinite recurrences by suggesting a hybrid approach: store the recurrence rule and materialize instances only for a bounded window, with a mechanism to handle exceptions.

1. Clarify Requirements

Ask questions to understand the scope: What types of recurrence patterns are needed (daily, weekly, monthly, custom)? How far into the future should events be generated? What are the query patterns (e.g., fetch events for a date range)?

2. Design the Data Model

Propose a schema with a RecurrenceRule table (storing RRULE or similar) and an Event table for individual instances. Consider adding an Exception table for modified or cancelled occurrences.

3. Choose Generation Strategy

Decide between pre-materializing instances (e.g., for the next year) or generating on-demand. Discuss trade-offs: pre-materialization simplifies queries but requires updates for rule changes; on-demand is flexible but may be complex for range queries.

4. Handle Exceptions and Modifications

Explain how to handle edits to a single occurrence (e.g., store an exception with a reference to the original event) and how to handle changes to the entire series (update the rule and regenerate instances).

5. Address Edge Cases and Scalability

Discuss time zones, DST, infinite recurrences, and performance considerations (e.g., indexing, caching). Mention how to handle queries efficiently, such as using a materialized view or a separate index for event instances.

Key Points to Mention

  • Use of iCalendar RRULE standard for defining recurrence patterns
  • Separation of recurrence rule from event instances to avoid data duplication
  • Handling exceptions (modified or cancelled occurrences) with an exception table or override mechanism
  • Time zone and DST handling: store events in UTC and convert for display, or use local time with time zone info
  • Materialization strategy: pre-generate instances for a bounded window vs. on-demand generation
  • Query performance: indexing on start/end times, using range queries, and caching frequently accessed data

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

Q3

How would you add availability search across a calendar?

Algorithms & Data StructuresSystem Design
Author's notes

Blanked for a second.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what does 'availability' mean (free/busy, working hours), what granularity (15-min slots), and what scale (number of users, events). Then propose a data model (e.g., intervals) and an algorithm to find common free slots, discussing trade-offs between precomputation and on-the-fly merging. Finally, outline how to scale the solution using indexing, caching, and distributed processing.

Pro tip: Mention that you would store busy times as intervals and use a sweep-line algorithm to find free slots, and that you would consider time zones and daylight saving time from the start—this shows attention to real-world complexity.

1. Clarify requirements

Ask about the definition of availability (free/busy, working hours), the granularity of slots (e.g., 15 minutes), the number of users and events, and whether the search is for a single day or a range.

2. Design data model

Represent busy times as intervals (start, end) per user. Consider storing them in a database with appropriate indexes, or in memory for fast access.

3. Develop algorithm

For a set of users, merge their busy intervals and find gaps within the desired time window. Use a sweep-line or interval tree approach for efficiency.

4. Address scalability

Discuss how to handle large numbers of users: precompute availability, use caching, shard by user or time, and consider distributed processing (e.g., MapReduce) for batch queries.

5. Handle edge cases

Account for time zones, daylight saving time, recurring events, all-day events, and partial availability (e.g., user is free for 30 minutes but slot is 60 minutes).

Key Points to Mention

  • Interval representation and merging (sweep-line algorithm)
  • Time zone and daylight saving time handling
  • Granularity of slots and rounding
  • Scalability: indexing, caching, sharding, distributed processing
  • Trade-offs between precomputation and on-the-fly computation
  • API design for querying availability (e.g., GET /availability?users=...&start=...&end=...)

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

Q4

How would you extend this to support multiple users sharing a calendar?

System DesignTechnical Trade-offs
Author's notes

This is where the scope started feeling real.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the current single-user calendar design and the new requirements for multi-user sharing (e.g., permissions, real-time updates, conflict resolution). Then propose a high-level architecture that introduces a sharing model, access control, and data synchronization, while discussing trade-offs between consistency, latency, and complexity.

Pro tip: Emphasize the importance of defining clear access control roles (owner, editor, viewer) and handling concurrent edits gracefully, as these are common pain points in shared calendars. Also, mention how you would measure success (e.g., user engagement, sync latency) to show product thinking.

1. Clarify Requirements and Assumptions

Ask questions to understand the scope: How many users per calendar? What sharing permissions are needed? Is real-time collaboration required? What are the consistency and availability requirements?

2. Design Data Model and Access Control

Propose a schema that supports multiple users per calendar, such as a many-to-many relationship with roles (owner, editor, viewer). Discuss how to enforce permissions at the API and database levels.

3. Handle Concurrent Edits and Synchronization

Choose a strategy for conflict resolution (e.g., optimistic locking, CRDTs, or operational transforms) and describe how updates propagate to all users (e.g., WebSockets, polling, or push notifications).

4. Address Scalability and Performance

Discuss how the design scales with many shared calendars and users: sharding, caching, read replicas, and efficient notification systems. Consider trade-offs between consistency and latency.

5. Summarize Trade-offs and Next Steps

Recap key decisions and their implications (e.g., complexity vs. real-time collaboration). Suggest metrics to monitor and potential iterations based on user feedback.

Key Points to Mention

  • Role-based access control (RBAC) for calendar sharing permissions
  • Data model changes: many-to-many relationship between users and calendars
  • Conflict resolution strategies (e.g., optimistic concurrency, CRDTs)
  • Real-time update mechanisms (WebSockets, server-sent events, push notifications)
  • Scalability considerations: sharding, caching, and database indexing
  • Trade-offs between consistency, availability, and latency (CAP theorem)

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

Q5

If you added persistence later, how would that change how you write and structure your tests?

Technical Trade-offsSystem Design
Author's notes

Pretty good question actually.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Acknowledge that adding persistence introduces state and external dependencies, which fundamentally changes test design. Explain how you would shift from pure unit tests to a layered strategy: keep unit tests for business logic, add integration tests for the persistence layer, and use test doubles for the database in higher-level tests. Emphasize the importance of test isolation, data cleanup, and deterministic outcomes.

Pro tip: Mention that you'd use the repository pattern to abstract persistence, allowing you to swap in in-memory implementations for fast unit tests and real databases for integration tests. Also, highlight that you'd version your test data and use transactions to roll back changes, ensuring tests don't interfere with each other.

1. Identify the impact of persistence

Recognize that persistence adds state, I/O, and external dependencies, which can make tests slower, flaky, and order-dependent. This requires re-evaluating your test strategy.

2. Layer your tests

Separate unit tests (no persistence) from integration tests (with persistence). Keep unit tests fast and focused on logic, while integration tests verify the interaction with the database.

3. Use abstractions and test doubles

Abstract persistence behind interfaces (e.g., repositories) so you can inject in-memory fakes for unit tests and real implementations for integration tests. This keeps tests fast and maintainable.

4. Ensure test isolation and cleanup

Use transactions, unique test data, or database snapshots to isolate tests. Clean up data after each test to avoid side effects and ensure repeatability.

5. Automate and monitor

Integrate persistence tests into CI/CD, monitor for flakiness, and use tools like Testcontainers for consistent environments. Regularly review test performance and reliability.

Key Points to Mention

  • Test pyramid: more unit tests, fewer integration tests, even fewer end-to-end tests.
  • Repository pattern to decouple business logic from persistence.
  • In-memory databases (e.g., H2, SQLite) for fast integration tests.
  • Transaction rollback or database cleanup between tests.
  • Testcontainers for realistic database testing in CI.
  • Avoid shared state and ensure tests are independent and deterministic.

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