amazon logo
Amazon· SDE I

Amazon | SDE 1 | Round 1 | On Campus | India | Feb 2022

Result
Ongoing
Location
India
Posted
28 Feb 2022
278 reads

Summary

I completed my first technical interview for an SDE1 role at Amazon in India during February 2022. I successfully solved the given coding challenge, addressed follow-up questions on complexity, and found the experience positive, receiving an invite for the next round.

How it went

As a 4th-year ECE student from a Tier 2 college, I had my first technical interview for an SDE1 position at Amazon through an on-campus opportunity. This took place in India in February 2022. The round began with a brief self-introduction and a discussion about my projects. The core of the interview was a coding problem: Given two words, beginWord and endWord, and a dictionary wordList, return the number of words in the shortest transformation sequence from beginWord to endWord, or 0 if no such sequence exists.

I implemented a BFS-based solution. I utilized a hashset for wordList entries and another for tracking visited words. Starting from beginWord, I systematically explored 'sibling' words (those differing by one character) using a queue, ensuring they were in the wordList and unvisited. I continued this process until endWord was reached or all possibilities were exhausted. I took about 20 minutes to devise the approach and another 20 minutes to code and explain it. The interviewer then asked me about the time and space complexity of my solution, which I was able to answer correctly. The overall experience was positive; the interviewer was kind and supportive. I've since received an invitation for Round 2.

Questions asked (1)

  1. 01

    Word Ladder

    Data Structures & Algorithms · Hard

    Given two words, beginWord and endWord, and a dictionary wordList, return the number of words in the shortest transformation sequence from beginWord to endWord, or 0 if no such sequence exists.

    Example 1:

    Input: beginWord = "hit", endWord = "cog", wordList = ["hot","dot","dog","lot","log","cog"]
    Output: 5
    Explanation: One shortest transformation sequence is "hit" -> "hot" -> "dot" -> "dog" -> cog", which is 5 words long.
    Example 2:
    Input: beginWord = "hit", endWord = "cog", wordList = ["hot","dot","dog","lot","log"]
    Output: 0
    Explanation: The endWord "cog" is not in wordList, therefore there is no valid transformation sequence.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Amazon recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!