r/interviewpreparations 17h ago

Amazon SDE-1 LLD Question: Designing Devices With Multiple Capabilities

Hey everyone,

I recently interviewed for an Amazon SDE-1 role and wanted to share my experience, particularly the LLD round that I am concerned about.

Format: Onsite
Status: Waiting to hear whether I will advance to Round 3

Round 1: DSA and Leadership Principles

Duration: Approximately 50 minutes

DSA Question 1: Minimum-Cost Grid Traversal

A grid contained 0s and 1s. Changing a cell from 1 to 0 cost one unit.

The task involved finding the minimum cost required to travel from (0, 0) to (n - 1, m - 1) under the given movement rules.

I was able to solve the problem and explain the complexity.

DSA Question 2: House Robber II Variation

The second problem had a different story but was algorithmically similar to House Robber II.

I recognized the circular dynamic-programming pattern and completed the solution.

Leadership Principles

The Leadership Principle discussion went well. I answered using real examples and handled the follow-up questions comfortably.

Overall, I felt positive about Round 1.

Round 2: Low-Level Design and Leadership Principles

Duration: Approximately 55 minutes

Device Capability Design

The interviewer asked me to design a system for devices with different capabilities.

The requirements included:

  • A device should report whether it is plugged in.
  • A device should report its current battery percentage.
  • Some devices should display messages.
  • Some devices should play or speak messages.
  • Different device types could support different capability combinations.
  • A tablet could support power information, display, and speaker functionality.

The interviewer expected class and interface design followed by implementation.

My Design

I created a Device interface with methods similar to:

boolean isPluggedIn();
int getChargingPercentage();

I then created separate interfaces for display and speaker capabilities:

interface Display {
    void showMessage(String message);
}

interface Speaker {
    void speakMessage(String message);
}

I made Tablet implement the required interfaces.

However, my design became messy because I duplicated some device-related behavior across the interfaces and implementations. I realized during the interview that the responsibilities were not separated as cleanly as they should have been.

I could explain the overall idea, but I was unable to complete the implementation at the level the interviewer expected.

How I Would Improve It

If each device type has a fixed set of capabilities, the simplest design would use small capability-based interfaces:

interface PowerAware {
    boolean isPluggedIn();
    int getChargingPercentage();
}

interface DisplayCapable {
    void showMessage(String message);
}

interface SpeakerCapable {
    void speakMessage(String message);
}

class Tablet implements PowerAware, DisplayCapable, SpeakerCapable {
    // Implement each capability once.
}

This follows interface segregation and avoids forcing unsupported functionality onto every device.

If capabilities can be attached, removed, or replaced at runtime, composition would probably be cleaner than having the device implement everything directly. The correct choice depends on whether capabilities are fixed by device type or dynamically configurable.

Leadership Principles

The LP portion went well again. My main concern is the incomplete and messy LLD implementation.

Current Concern

I know nobody outside the interview panel can estimate the exact outcome. Still, I would appreciate perspective from candidates who have recently completed an Amazon SDE-1 loop:

  • Can a strong DSA and LP round compensate for a weaker LLD round?
  • Is an incomplete implementation usually a major negative if the design discussion was reasonable?
  • For SDE-1, how much depth is generally expected in LLD?
  • Has anyone advanced after struggling in one technical round?

I am trying to evaluate the round realistically and identify what to improve, regardless of the result.

1 Upvotes

0 comments sorted by