Amazon | SDE1 6M internship | Oncampus | December 2021
Anonymous User
1303

Status: 4th year B.Tech undergrad CS student
Position: SDE 6Months Intern at Amazon

Round 1
consisted of debugging, coding , MCQ's and some behavioural questions on AMCAT Platform.
I am able to solve both the Coding Questions

Round 2 (Technical Interview 1)
The interviewer introduced himself and was asked about me. He then started to ask me coding questions:

  • Given an array of integers, and a number ‘sum’, find the number of pairs of integers in the array whose sum is equal to ‘sum’, you need to handle the duplicate pairs. i gave him O(N) time and O(N) space Solution he seems to be satisfied with my approach
  • Given an array of strings you need to return whether the combinations of strings that form up to a specific string in the given array
	For example the Array of strings are
	['superstar', 'super' , 'star' , 'supe', 'rstar' , 'ilikesamsung' , 'i' , 'like' , 'samsung' ,'ilike' , 'samsung']
	for superstar  you should return [['super','start'],['supe','rstar]]
	for ilikesamsung you should return [['i','like','samsung'],['ilike','samsung']]
	in the same way you should check for every string in the array

Firstly I gave him the brute force approach using the combinations of the strings in array except the string you are checking he then told to optimize the time complexicity.
I Optimized the solution using partition technique he seems satisfied and i coded the whole approach and made dry run for the sample test cases he provided.

Atlast he asked whether i had any questions for him,I asked whats the techstack used in amazon and work culture.

Round 3 (Technical Interview 2)
The interviewer introduced himself and was asked about me. He then started to ask me coding questions:

  • Given an array of k sorted LinkedLists you need to merge all the LinkedLists into a single sorted LinkedList . I told the brute force approach using merge technique which is of O((total_nodes)*k) time complexicity and O(totalnodes) space complexicity he told to optimize and i told him the min heap approach and he seems satisfied with approach and coded the same.he asked me to dry run the given test cases and he asked about the time complexicity which is of O((totalnodes)*logk)
  • Check Whether the given binary tree is a binarysearch tree or not, he wanted the most optimal solution .I told him the O(N) time and O(1) space complexicity solution he seems satisfied and told me to code the approach dry run the sample testcases.
  • Give a 2D matrix which contains only 0's and 1's and given an integer k,the matrix contains k^2 1's. find the minimum number of swaps required to group all 1's in submatrix of size k*k .I gave him the brute force approach and I'm unable to optimise the solution and the time was completed

Atlast he asked whether i had any questions for him,I asked whats the techstack used in amazon and work culture and how he got promoted from sde1 to sde2.

After round 2 there is no response from recruiter and i'm not sure whether i got selected or not and I think i haven't cleared round2 because i'm not able to optimise 3rd problem. all the hardwork went waste 😭.

Comments (2)