Skip to content
Related Articles
Open in App
Not now

Related Articles

Amazon Interview Experience for Internship (On-Campus)

Improve Article
Save Article
Like Article
  • Difficulty Level : Medium
  • Last Updated : 01 Nov, 2020
Improve Article
Save Article
Like Article

I’m a 3rd-year student at NIT Jamshedpur. Amazon visited our campus for Internships.

ROUND 1: The first round was an online round, and there were 4 sets in this round.

1st set was the code debugging round and there was approx 6-7 code. 2nd round was the coding round and was also quite easy, 3rd was the aptitude round and the last round was the behavioral questions round.

The 2 coding questions in the online round were:

  1. Merge two sorted linked lists

  2. There was a 2d matrix with each cell containing a value. we have to consider all paths to reach from the top-left cell of the matrix to the bottom-right cell. We can move in the only bottom or right direction And we have to consider 1 minimum value cell in all paths and then we have to find the maximum all those minimum values.


    array a[3][3]

    Here all possible paths is (7->10->6->11->9), (7->10->5->11->9), (7->10->5->4->9), (7->8->5->11->9), (7->8->3->4->9), (7->8->5->4->9). so here minimum cells in these paths were 6, 5, 4, 5, 3, 4. And ao the maximum of these is 6. so 6 is the answer.  I solved this with the use of a dp table, by observing i got the relation dp[i][j] = max( min(a[i][j], dp[i+1][j]), min(a[i][j], dp[i][j+1])).

ROUND 2 (Face to Face): This was the final round. there were a total of 2 questions. First, he introduced himself to me and his role in the company, and then he asked me to introduce myself. After that, he jumped straight into the coding questions

  1. This question was quite difficult to interpret at first because I think the interviewer was testing that can I implement a data structure here. the question was:- There is an ant colony with n ants. And there will be a total of m interactions between ants. So, ( a colony will be good only if all the interactions were between opposite genders). We have been giving the interactions between ants, and we have to find out whether this colony can be good or not. for eg:-

    3 3    
    1 2
    2 3                 
    1 3

    So there are a total of 3 ants and 3 interactions. ant 1 interact with ant 2, 2 with 3, and 1 with 3. we have to tell whether this colony can be good or not. So here this colony can’t be good, as 1 interact with 2 and 3, so the gender of 2 and 3 should be the same, but 2 and 3 also interact so there is no possible way for this colony to be good

    I solved this by implementing a graph in this question and used the concept of bipartite components in this question.

  2. Next Greater Element


My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!