← Remitly Interview Insights

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

Senior
May 2026

Summary

System design round at Remitly for a software engineering role. The whole session was basically one big elevator question that kept branching into scheduling algorithms, concurrency, and multi-elevator scaling. Dense but kind of interesting if you're into that stuff.

Questions Asked (4)

Q1

Design an object-oriented elevator system. Walk through the core classes and interfaces you'd define (elevator, controller, request, floor, buttons, sensors), how they interact, and how you'd handle concurrency and faults.

System DesignTechnical Trade-offs
Author's notes

I started with the obvious classes and felt okay until they pushed on concurrency.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then define core classes and interfaces with clear responsibilities, and finally discuss concurrency and fault handling. Use a state machine for the elevator and a dispatcher for the controller, and explain trade-offs in scheduling algorithms.

Pro tip: Emphasize separation of concerns: keep the elevator as a state machine, the controller as a dispatcher, and use interfaces for extensibility. Mention that you'd start with a simple scheduling algorithm (e.g., SCAN) and iterate based on metrics.

1. Clarify Requirements and Scale

Ask about number of elevators, floors, traffic patterns, and fault tolerance expectations. This guides design decisions like centralized vs distributed control.

2. Define Core Classes and Interfaces

Identify main entities: Elevator, Controller, Request, Floor, Button, Sensor. Specify their key attributes and methods, and how they interact via interfaces.

3. Design Interactions and State Management

Describe how requests flow from buttons to controller to elevator, and how elevator state (idle, moving, doors open) is managed. Use a state pattern for elevator states.

4. Address Concurrency and Fault Tolerance

Explain thread-safety for shared data (e.g., request queues), use of locks or concurrent collections, and fault handling (sensor failures, power outages) with redundancy and fail-safe modes.

5. Discuss Trade-offs and Extensibility

Compare scheduling algorithms (FCFS, SCAN, LOOK) and their impact on wait time and throughput. Mention how to extend for multiple elevators, zoning, or priority requests.

Key Points to Mention

  • Use of interfaces for Elevator, Controller, and Request to allow different implementations (e.g., different scheduling strategies).
  • State pattern for elevator states (Idle, MovingUp, MovingDown, DoorsOpen) to encapsulate behavior.
  • Concurrency: thread-safe request queue, synchronized methods or locks, and avoiding race conditions in state transitions.
  • Fault tolerance: sensor redundancy, watchdog timers, fail-safe mode (e.g., move to nearest floor and open doors), and logging for diagnostics.
  • Scheduling algorithm: SCAN/LOOK for efficiency, with considerations for starvation and fairness.
  • Scalability: how to handle multiple elevators with a central controller or distributed coordination.

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

Q2

Given pending requests for floors [1, 99, 2], how does your scheduler guarantee stopping at floor 2 before floor 99, using only a single internal queue? Describe the queue operations, tie-breaking rules, and the time and space complexity.

Algorithms & Data StructuresSystem Design
Author's notes

This is where I got tripped up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify that the scheduler must respect the current direction of travel, so it should stop at floor 2 before floor 99 when moving upward. Explain how to use a single priority queue with a custom comparator that orders floors by direction and proximity, and describe the enqueue/dequeue operations and tie-breaking rules.

Pro tip: Mention that the comparator must be dynamic based on the current direction, and that a simple min-heap or max-heap alone won't work without direction awareness. Also, note that the space complexity is O(n) for n pending requests, and time complexity is O(log n) per operation.

1. Clarify requirements and assumptions

Confirm that the elevator is currently moving upward and that the goal is to stop at floor 2 before floor 99. State that the scheduler must serve requests in the current direction before reversing.

2. Choose the data structure

Use a single priority queue (heap) with a custom comparator that orders floors based on the current direction and distance. For upward direction, floors above current are prioritized in ascending order, and floors below are deprioritized.

3. Define queue operations and tie-breaking

Enqueue: insert floor with O(log n) time. Dequeue: extract the highest-priority floor (next stop) in O(log n) time. Tie-breaking: if two floors are equidistant, prefer the one in the current direction; if still tied, use floor number order.

4. Analyze complexity and edge cases

State that time complexity is O(log n) per operation and space is O(n) for n pending requests. Discuss edge cases like direction change, duplicate requests, and empty queue.

Key Points to Mention

  • Direction-aware comparator: prioritize floors in the current direction of travel.
  • Single priority queue implementation with custom ordering logic.
  • Time complexity: O(log n) for insertion and extraction.
  • Space complexity: O(n) for storing pending requests.
  • Tie-breaking rules: direction first, then distance, then floor number.
  • Handling direction reversal: when no more floors in current direction, switch direction and re-evaluate priorities.

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

Q3

Propose a scheduling algorithm for the elevator system that optimizes for both travel time and fairness across requests.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Described a SCAN-based approach and mentioned the starvation problem with requests at one end of the building.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem constraints (e.g., number of elevators, request patterns, optimization goals) and then propose a hybrid algorithm like LOOK with fairness adjustments (e.g., aging or round-robin). Discuss trade-offs between travel time and fairness, and suggest metrics (average wait time, max wait time) to evaluate performance.

Pro tip: Acknowledge that pure optimization for travel time can starve some requests, so fairness mechanisms like aging are crucial; also mention that real-world systems often use heuristics due to dynamic conditions.

1. Clarify Requirements and Constraints

Ask about the number of elevators, building size, request patterns (e.g., peak hours), and whether fairness is defined as equal wait time or bounded wait time. This shows you consider practical context.

2. Define Objectives and Metrics

State that travel time optimization aims to minimize average wait/travel time, while fairness ensures no request waits excessively. Propose metrics like average wait time, 95th percentile wait time, and starvation count.

3. Propose a Baseline Algorithm

Describe a standard algorithm like LOOK (elevator continues in direction until no more requests, then reverses) which optimizes travel time by reducing direction changes. Mention its limitations regarding fairness.

4. Introduce Fairness Mechanisms

Enhance the baseline with fairness: e.g., aging (increase priority of waiting requests over time) or round-robin among floors. Explain how this balances travel time and fairness.

5. Discuss Trade-offs and Evaluation

Analyze trade-offs: fairness may increase average travel time. Suggest simulation or real-world testing to tune parameters (e.g., aging rate). Mention that adaptive algorithms could dynamically balance based on load.

Key Points to Mention

  • LOOK algorithm and its variants (e.g., SCAN, C-SCAN) for travel time optimization
  • Fairness metrics: max wait time, starvation avoidance, Jain's fairness index
  • Aging or priority boosting to prevent starvation
  • Trade-off between average wait time and worst-case wait time
  • Real-world constraints: multiple elevators, dynamic requests, energy efficiency
  • Simulation or queuing theory for evaluation

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

Q4

How does your design scale to multiple elevators, and how would you support peak traffic modes?

System DesignTechnical Trade-offs
Author's notes

Talked about a central dispatcher assigning requests to the nearest available elevator using a cost function (distance plus load).

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (number of elevators, floors, traffic patterns), then describe a distributed control architecture where each elevator is an independent agent coordinated by a central dispatcher. Explain how you would handle peak traffic modes by dynamically adjusting scheduling policies (e.g., zoning, express runs) and using real-time data to optimize throughput.

Pro tip: Emphasize trade-offs between centralized vs. decentralized control and how you would handle failures gracefully—this shows you think about reliability and scalability beyond just the happy path.

1. Clarify Requirements and Scale

Ask about the number of elevators, floors, building type, and expected traffic patterns to scope the problem. This ensures your design addresses the actual constraints.

2. High-Level Architecture

Propose a central dispatcher service that receives requests and assigns them to elevators, with each elevator as an independent controller. Discuss communication protocols (e.g., message queues) and data storage for state.

3. Scaling to Multiple Elevators

Explain how the dispatcher can scale horizontally (e.g., sharding by building zones) and how elevators coordinate to avoid conflicts. Mention load balancing and fault tolerance.

4. Peak Traffic Modes

Describe dynamic scheduling algorithms (e.g., shortest-seek-time-first, zoning, express elevators) and how they adapt based on real-time demand. Discuss trade-offs between fairness and throughput.

5. Monitoring and Adaptation

Outline how you would collect metrics (wait times, utilization) and use them to adjust policies automatically or via manual overrides. Mention failover and degradation strategies.

Key Points to Mention

  • Centralized vs. decentralized control trade-offs
  • Scheduling algorithms (e.g., SCAN, LOOK, destination dispatch)
  • Horizontal scaling of the dispatcher (sharding, partitioning)
  • Fault tolerance and graceful degradation (e.g., if dispatcher fails, elevators operate independently)
  • Real-time traffic prediction and dynamic policy adjustment
  • Metrics and monitoring for performance tuning

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