In-feeds

Total views

SDE-1 Amazon Interview Experience

SDE-1 Amazon Interview Experience 

Interview experience candid

Interview on:  11/11/2021

Round 1: Online Hacker-rank coding test


Round 2: Technical Interview

Mode: Virtual call at Chime

Duration: 1 hour


The interviewer joined the call on time. Asked for introduction, no questions asked on my introduction. They directly came to the point and told me that this round will consist of 2 coding questions and 1 leadership question. In case, we run out of time we will have 1 coding and 1 leadership question.


So, the agenda is clear, it is all about programming now


In between, they set the LiveCode there and shared it


So the first question was

  

Q. Longest valid parentheses sub-string


Firstly, they asked me to discuss the approach, so I started with stack, pushing '(' to stack and popping the top of the stack when we get ')' at the same time incrementing the count.

This solution failed when a test case like


(()()( : expected o/p - 4


They have given me some hints and clues to approach the solutions. The solution was to push the indexes of '(' to stack and calculate the length of valid parentheses sub-string based on current index and index at top of stack whenever ')' arrives in string.


Fortunately, I was able to reach the solution


After that, I coded that in java ( only functional part and no input/output )


While discussing the solution I used a lot of comments and communicated approach with both words and text.


As more time was passed solving that problem, so I was directly asked a leadership question


Q.Tell about a time when you are running out of deadline and how you managed it?


to this, I told about my experience with deadlines from my previous internship. They also cross-questioned me about how I managed it. My answer also takes regards from Amazon's leadership principles


Verdict: Passed


Round 3: Technical Interview

Same Agenda as round 2.


The Interview started with 'Tell me about yourself, I answered that and then we directly jumped to the programming problem.


so the question was based on trees and the solution was based on the sum of the tree. Honestly, I didn't hear about this question


Q. Product offer listings are present in a tree form.

                  


Hope you got the question right, I tried to solve using post-order.

After reaching the leaf will check if it is negative and if it is then disconnect it from its parent. Doing the same for all the nodes will help us prune invalid products. The main idea was to identify the basic struct of the problem and then insert the story in it.


The solution I coded :


node offerTree(node head){
  int cLeft = -2, cRight = -2;
  if(head != null){
     node temp = head;
    offerTree(head.left);
    if(head.value == -1)//not determined
    {
      cLeft =-1;
    }
    else{
      cLeft = head.value;
    }
    //
    offerTree(head.right);
    if(head.value == -1)//not determined
    {
      cRight = -1;
    }
    else{
      cRight = head.value
    }
    
    
    if(cLeft = -1){
      temp.left =null;
    }
    if(cRight = -1){
      temp.right =null;
    }
    else{
      temp.value = cLeft + c.right;
    }
     head = temp;
    return head;
  }
}


They seemed to be convinced with the solution but are looking for a better one. One more thing I took too much time the write the code as I was also confused as to where to eliminate and locate the parent node. Now, I was already out of time so they skipped the leadership question and wished me the best of luck for the future😅


Verdict: Rejected


Interview Preparation:

  • Click here to view tips on how to best prepare for a virtual interview.
  • Click here to explore important topics, which will help you to prepare for your interview.
  • Watch this prep video to get familiar with Amazon’s interview style (Leadership Principles, Behavioral questions, and STAR Method).
  • To know more about Amazon you may visit: https://www.amazon.jobs/en/working/working-amazon
  •  Amazon's dress code is casual, wearing a suit is not necessary – please dress comfortably!


Resources I referred to:




If you got some help please like the button at the top. Also poll your programming choice at the bottom of article

Comments

Popular posts from this blog

Solutions LTI Infinity Coding Challenge 2021

Persistent Systems

LTI Infinity Coding Challenge 2021