All experiences
Pending2026-09-02·3 min read

Amazon SDE-1 — DSA + LLD Onsite (Learnings from a Messy LLD)

Amazon SDE-1 onsite. Round 1 was two DSA problems (grid path + House Robber II variant) plus LPs. Round 2 was a device-capabilities LLD where I learned the hard way about interface segregation.

Company

Amazon

Role

SDE-1

Rounds

2

YOE

2

Round 1 — DSA + LP (Onsite)

DSA 1: Minimum cost path in a grid of 0s and 1s. You can flip a 1 to 0 at cost 1; find min cost from (0,0) to (n-1,m-1). Solved it (0-1 BFS / Dijkstra approach).

DSA 2: A problem similar to House Robber II (circular), though the statement was framed differently. Solved it.

LP: Leadership Principle questions went well.

Round 2 — LLD (Onsite)

This is where I learned a valuable lesson.

Problem: Design devices with different capabilities:

  • Every device can tell if it's plugged in and report charging percentage
  • Some devices have a Display (show a message)
  • Some have a Speaker (play/speak a message)
  • Different devices support different combinations (e.g., a Tablet has device + display + speaker)

What I did:

  • Created a Device interface with isPluggedIn() and getChargingPercentage()
  • Created a Display interface with showMessage()
  • Created a Speaker interface with a speak method
  • For the Tablet, I implemented all three interfaces

Where it went wrong:

  • My design became messy. I ended up duplicating functionality and the Tablet implementation felt like it was implementing the same thing multiple times.
  • I realized mid-interview that I wasn't applying interface segregation cleanly, and couldn't bring the implementation to the level expected.

What I should have done:

  • Kept the interfaces cleanly segregated (each capability = one focused interface)
  • Used composition properly — the Tablet composes the capabilities rather than muddling them
  • Thought about extensibility upfront (adding a new capability without touching existing code)

Lessons Learned

  1. Practice LLD, not just DSA. SDE-1 at Amazon includes a real LLD round, and clean OOP design under time pressure is a separate skill.
  2. Interface Segregation Principle matters — don't create fat interfaces or force classes to implement things they don't need.
  3. Think before coding in LLD — spend the first few minutes designing the class/interface structure. A messy start compounds.
  4. Composition over inheritance — especially when objects have varying combinations of capabilities.

Tips for Amazon SDE-1

  • Two DSA problems + LP in one round is common. Practice medium DSA with clean code.
  • The LLD round is real — practice classic LLD problems (parking lot, elevator, this device-capabilities type).
  • Know your SOLID principles, especially Interface Segregation and Open/Closed.
  • LPs are asked in every round — prepare STAR stories.

Join 500+ engineers

Weekly interview questions + comp data insights. No spam. Unsubscribe anytime.

Powered by Substack. Your email is safe.