Amazon SDE 1 three-round interview experience: ultimately rejected.
Round 1: Coding
He first had me do a self-introduction, briefly going over my career plans, and then we moved into the coding part.
Q: Design a file search API backend that supports recursive subdirectory search.
There are a few edge cases to watch out for here. If the input directory is null or not a directory, the output should be "the current search location is not a folder." If the directory is empty or has no files, the output should be "file not found: " plus the filename. If the specified filename doesn't exist anywhere in the directory or its subdirectories, the output should also be "file not found: " plus the filename. At the start I was completely caught off guard by this problem, but I did my best. I asked clarifying questions based on what I was given, but I never ended up solving it, so overall this round didn't go well.
Round 2: Coding
Q: Sliding window maximum
My own solution was a bit brute force, and when asked if there was a better approach, I couldn't come up with one. Brute force actually isn't a good fit here — it can time out. Iterating through every window and computing the max gives O(nk) time complexity, which won't pass the large test cases. The correct approach is to use a deque to maintain candidates for the current window's maximum, keeping the values at the indices stored in the queue monotonically decreasing. Overall, this round went a lot better than the first one.
Round 3: LP + Coding
BQ 1: Tell me about a challenge you faced, what role you played in it, and what the outcome was.
BQ 2: A time you had a conflict with a coworker or manager and how you handled it.
BQ 3: The most complex problem you've ever solved.
The interviewer spent a lot of time on these questions and dug in with deep follow-ups — we had a really good conversation.
LP: LRU cache problem
For this one I used a doubly linked list plus a map. I kept the cache nodes in the doubly linked list and used the map to get O(1) lookups. You just need to be careful handling the get and put cases separately. I did pretty well on this round, and walked through my thinking and my solution in detail.
Result: rejected after five business days.
Discussion
Loading comments…