Amazon SDE-2 Interview Experience
Anonymous User
4512

Hi community
I hope you all are well.
Interviewing for Location: Bengaluru
Amazon Team: Amazon Pay
Current Organisation: PBC
College: Tier 1

I completed the process of Amazon SDE-2 Interview and here is my Interview experience till now.
I just wanted to know from the whole community what can I expect as the result at the end.

I don't know whether the onsites round are eliminatory or not, will share the call details with recruiter at the end of the post.

OA Round:
Got two questions on binary search on hackerrank. Not pretty straigh forward but yeah, the were exhausting and both questions I passed all test cases.

Telephonic Round:(Duration: 1 hour)
Two interviewers were there. One of them was from India and another one from USA.
Asked me straight forward question and no LP question in this round.
Solved it completely. He asked me for TC and SC which I answered correctly.
The question was same as this: https://leetcode.com/problems/number-of-islands/description/

He told me to dry run the test case which I did and worked fine for him and he was satisfied.
Self Verdict: Strong hire

Onsite Round 1: (Duration: 1 hour)
This was a DSA round with LP problem
Interviewer was very calm and quite. He just gave me problem statement and said he will come back after 1 hour.
First he gave me one problem statement same as https://leetcode.com/problems/number-of-islands/description/ and in the end he told me
And reorganize the whole matrix of cells as grid Graph with (adjacency list representation)
In this he was expecting me to print the output as
Combine all the islands and then make another matrix from this same where all islands will be represented by 1 and another connected component becomes zero.
This part of problem statemet was vague as whatever is written he wasn't expecting that one(he was expecting the matrix while it is written as adjcancy matrix)

Solved the first part of the problem to count the islands and the another part as well using some logic. But at the end he was not satisfied with my answer and told me that I didn't ask for this adjcancy matrix I asked for the real output answer.
Gave me 5 min extra time and I could think of the approach but could not code it but he was not satisfied with my approach.

LP Problem: Learn and Be Curious.
Problem: Tell me how you keep yourself at best practices.How you keep yourself updated.

Self Verdict: Lean Hire(as could not solve second part of problem)

Onsite Round 2:LLD Round (Same day as onsite round - after 1 hour,Duration: 1 hour)

The interiviewer was very calm and chill. She was a SDM and had experience of 26 years, I wasn't even born when she started working in corporate xD.

Before the interview ,recruiter shared me a bluescape link where I didn't know what I have to do.

Interview started, she asked me about my intro,then She told me that
You see this bluescape, what it does is collaborative text sharing app.

You have to design this only.
In other terms you have to design google docs.

I fumbled in beginning and then started with what all the actors and actions can be. Then gave her some API then she started asking me about
Update text block API, how you will prevent when both the person using that doc/board edit the same block.
She was expecting that I would use distributed lock or message queue lock.
We discussed about this I said i will use Conflict tree which can be based upon timestamp and will show to the user whichever was updated latest.
She seemed fine but in the end we discussed about this that if one user is editing then other cant edit same block which I by myself told that we can take distributed lock on a particular block and she was fine.
I asked about my feedback she told me you are all good.You have a greate communication skill.
I resisted that there are always scope of improvement in any person so she told me about the message queue locking part and then she asked me LP questions.

LP: Customer obsession and deliver results.

Q1. Tell me about a time you went above and far for a customer.
Q2. Tell me about a time when you created something extra for the user.
Q3. Tell me about a recent project which you are proud of and what hurdles you faced in that.
Q4. Tell me about a time when you have some project and you could not deliver it completely or made some tradeoffs.

After both interviews, I called the HR after 4 hours and she told me I will have 2 more rounds.

Self Verdict: Strong Hire/Hire

Round 3: HLD with bar raiser(Duration: 1 hour 40 minutes)
For the first 35 minutes, we were discussing on LP problems, he was asking me follow ups and asked me some metrics as well, I made some metrics on my mind on spot so I guess i sounded little bit fake there.
HLD problem was, Design a tag management system.
I discussed FR, NFR and drew a diagram on the board on bluescape
Also we discussed about all the approaches, DB choice, concurrency handling and multiple questions.
This round went for 1 hour 40 minutes and we discussed almost everything.
In the end interviewer was very neutral and didn't give any feedback.
Also after this round my recruiter went on leave of 5 days so I had to wait for 5 days and after this my another round was scheduled which was coding round.
Self Verdict: Strong hire

I assume as I messed my 1st onsite round which was coding round, thats why my last round was coding round.

Round 4: DSA Round(Duration - 1 hour)
This round I guess I made it/bombed it I dont know.
The interview asked me LP problems for first 15 minutes and I answered them very well, I had my scenarios ready so It went well.

After that he gave me one DSA problem which I never tried upon,like I knew how to do that but never practiced that question.
So before moving forward, letting you guys know that I prepared all the LP questions from chatGPT, so before going in the interview i was reading all these questions and answer in star format from chatGpt.
So when he gave me question, i shared my screen and a tab was open where it was clearly visible that "LP Amazon" on chatGPT.
So he might think that I did cheating to answer LP question.

Now comes the DSA question.Only problem statement was given, no test cases, no constraints and thats it.
So it was very popular Trie question,But I never practiced it.

The exact question was this:

You are building a search suggestion service. 
You have a text file of all previous searches made on your website. 
You want to provide suggested completions for any user input. 
How would you build a solution?


    1. File contains:
        1. book
        2. batana
        3. batman
        4. batman
        5. bathroom
        6. batman
        8. bathroom
        7. batter
        7. 
        8. user types: bat

I fumbled a lot, made a lot of mistakes in the code and he kept correcting me and kept asking me questions how this is going to work, how the nodes will be created, how you will get all the words, some typos all these mistakes he kept me asking follow up questions like why you have added isEnd in the code, how you will get the top K searches only.
I answered them all but fumbled a lot, I had to think a lot like before answering his each question, I had to think that why we used to use this.

In the end he asked me the time complexity,I answered that as well.
Sharing the final code which I submitted there.

class Trie{
  unordered_map<char,Trie*>child;
  bool isEnd = false;
  unordered_map<string,int>freqMap;
};

class SearchSuggester {
    private:
    Trie* root;
    unordered_map<string,int>freq;
    
    void insertWord(string &word) {
        freq[word]++;
        TrieNode* node = root;
        for(char character:word) {
            if (!node->child.count(character)) {
                node->child[character] = new Trie();
            }
            node = node->child[character];
            node->freqMap[word] = freq[word];
        }
        node->isEnd = true;
    }
    
    static bool compFunc(pair<string,int>&firstWord,pair<string,int>&secondWord) {
        if(firstWord.second == secondWord.second) {
            retrun firstWord.first<secondWord.first;
        }
        return firstWord.second>secondWord.second;
    }
    
    
    public:
    SearchSuggester(vector<string>& pastSearches) {
        root = new Trie();
        for(string &word:pastSearches) {
            insertWord(word);
        }
    }
    
    vector<string> getSuggestions(string & userEntry) {
        Trie* node = root;
        for(char character:userEntry) {
            if (!node->child.count(character)) {
                return {};
            }
            node = node->child[c];
        }
        vector<pair<string,int>>allWords = {node->freqMap.begin(),node->freqMap.end()};
        sort(allWords.begin(),allWords.end(),compFunc);
        return allWords;
    }
}

int main() {
    vector<string>pastSearches = {
        "book","banana","batman","bathroom","batman"
    };
    
    SearchSuggester suggester(pastSearches);
    
    string query = "bat";
    vector<string>suggestions = suggester.getSuggestions(query);
    for(string suggestedWords:suggestions) {
        cout<<"suggestedWords are"<<suggestedWords<<"\n";
    }
    return 0;
}

//each word has a length of average length: l

//Insert Time complexity:O(sizeof(pastSearches*L)) 
//query time complexity: number fo words in userEntyr-> a, freqmap size for last node->b = O(a + blogb)

Self verdict: I dont know can you guys please tell me

I just wanted to ask the community that even though I fumbled a lot but submitted correct solution to the interviewer, Is there is any chance that final verdict can be in my favour?

Thanks.

Recently I got rejected in Flipkart LLD Round and share my experience and questions on this post.
https://leetcode.com/discuss/post/6687653/flipkart-sde2-machine-codingpsdsdesign-r-kw1u/

Sharing my cohesity Interview experience for which I am waiting for the result: https://leetcode.com/discuss/post/6774570/cohesity-mts-3-interview-experience-by-a-u9kg/

Result: Got the offer

Comments (9)