Amazon Interview Experience - GeeksforGeeks

20 Aug, 2021
Round 1(Coding on Hacker Rank platform):
Given an array of Strings, Each string has an id and version associated with it. string with alphabetic versions are the older versions and the string with numerical versions are the new version. We need to line up the strings for renovation such that older version strings (strings with alphabetic version) need to be put first in lexicographical order. If any clashes in arrange, then arrange them as per the lexicographical order of the id. The renovated strings need to be kept as in the input order.Example: 
Input:{a a , c  b , b b, a 1, b 2}
Output:{a a , b  b , c b, a 1, b 2}Expected time complexity O(N* log(N)). I was able to solve it with Heap (priority queue in c++).Given a 2 D array with each cell having values 1, 0, 9 where 1-> land , 0-> sea , 9->obstacle, we can only traverse in land (1).Need to find the Minimum number of steps required to reach the obstacle (9).we are allowed to traverse only to right, left, down and up.Expected Time Complexity: O(M * N) . I was able to solve it with BFS (Breadth-First Search)
Given an array of Strings, Each string has an id and version associated with it. string with alphabetic versions are the older versions and the string with numerical versions are the new version. We need to line up the strings for renovation such that older version strings (strings with alphabetic version) need to be put first in lexicographical order. If any clashes in arrange, then arrange them as per the lexicographical order of the id. The renovated strings need to be kept as in the input order.Example: 
Input:{a a , c  b , b b, a 1, b 2}
Output:{a a , b  b , c b, a 1, b 2}Expected time complexity O(N* log(N)). I was able to solve it with Heap (priority queue in c++).
Example: 
Input:{a a , c  b , b b, a 1, b 2}
Output:{a a , b  b , c b, a 1, b 2}
Expected time complexity O(N* log(N)). I was able to solve it with Heap (priority queue in c++).
Given a 2 D array with each cell having values 1, 0, 9 where 1-> land , 0-> sea , 9->obstacle, we can only traverse in land (1).Need to find the Minimum number of steps required to reach the obstacle (9).we are allowed to traverse only to right, left, down and up.Expected Time Complexity: O(M * N) . I was able to solve it with BFS (Breadth-First Search)
Need to find the Minimum number of steps required to reach the obstacle (9).we are allowed to traverse only to right, left, down and up.
Expected Time Complexity: O(M * N) . I was able to solve it with BFS (Breadth-First Search)
Round 2(Amazon chime paired Coding F2F):
Given a list of contacts containing name and phone number , we need to group the contacts which either have the same name or same phone number together.Example:
Input :{{abc ,9987},{xyz,9986},{dfg,9987}}
Output:{{{abc ,9987},{dfg ,9987}},{{xyz,9986}}}Union Find Algorithm or Depth First search Algorithm was applicableGiven a Sorted array, such that each number repeats exactly twice except one number, we need to find that numberhttps://practice.geeksforgeeks.org/problems/find-the-element-that-appears-once-in-sorted-array0624/1#Example:
Input:{1,1,2,2,3,4,4,5,5} 
Output: 3Expected Time Complexity :O(log(N)) Binary search was applicableDifference between thread and ProcessDNS Server mechanism
Given a list of contacts containing name and phone number , we need to group the contacts which either have the same name or same phone number together.Example:
Input :{{abc ,9987},{xyz,9986},{dfg,9987}}
Output:{{{abc ,9987},{dfg ,9987}},{{xyz,9986}}}Union Find Algorithm or Depth First search Algorithm was applicable
Example:
Input :{{abc ,9987},{xyz,9986},{dfg,9987}}
Output:{{{abc ,9987},{dfg ,9987}},{{xyz,9986}}}
Union Find Algorithm or Depth First search Algorithm was applicable
Given a Sorted array, such that each number repeats exactly twice except one number, we need to find that numberhttps://practice.geeksforgeeks.org/problems/find-the-element-that-appears-once-in-sorted-array0624/1#Example:
Input:{1,1,2,2,3,4,4,5,5} 
Output: 3Expected Time Complexity :O(log(N)) Binary search was applicable
Example:
Input:{1,1,2,2,3,4,4,5,5} 
Output: 3
Expected Time Complexity :O(log(N)) Binary search was applicable
Difference between thread and Process
DNS Server mechanism
Round 3(Amazon chime paired Coding F2F):
Given the Process ids in array and the parent of these Process ids in separate array, and the process id we need to kill. Find the List of the process which would get killed on killing the given process.Example:pid{1,2,3,4,5,6,7,8,9} 
parentpid{2,0,2,3,3,3,3,4,5} 
Killing Process: 3
Output :{4,5,6,7,8,9} Create a Directed Graph between the parent and Child process and perform BFS (Breadth First search)Given a Linked Link, Alter the Linked list as the belowInput:l1->l2->.. ln-2->ln-1->ln
Output: l1->ln->l3->ln-2...Separate out the Linked List by alternate nodes, we get two linked lists, reverse the second list and then join them.https://practice.geeksforgeeks.org/problems/reorder-list/1Discussion on LRU Cache Implementation. (Double Linked List and HashMap)Amazon Leadership Principles Questions. https://www.amazon.jobs/en/principles
Given the Process ids in array and the parent of these Process ids in separate array, and the process id we need to kill. Find the List of the process which would get killed on killing the given process.Example:pid{1,2,3,4,5,6,7,8,9} 
parentpid{2,0,2,3,3,3,3,4,5} 
Killing Process: 3
Output :{4,5,6,7,8,9} Create a Directed Graph between the parent and Child process and perform BFS (Breadth First search)
Example:
pid{1,2,3,4,5,6,7,8,9} 
parentpid{2,0,2,3,3,3,3,4,5} 
Killing Process: 3
Output :{4,5,6,7,8,9} 
Create a Directed Graph between the parent and Child process and perform BFS (Breadth First search)
Given a Linked Link, Alter the Linked list as the belowInput:l1->l2->.. ln-2->ln-1->ln
Output: l1->ln->l3->ln-2...Separate out the Linked List by alternate nodes, we get two linked lists, reverse the second list and then join them.https://practice.geeksforgeeks.org/problems/reorder-list/1
Input:l1->l2->.. ln-2->ln-1->ln
Output: l1->ln->l3->ln-2...
Separate out the Linked List by alternate nodes, we get two linked lists, reverse the second list and then join them.https://practice.geeksforgeeks.org/problems/reorder-list/1
Discussion on LRU Cache Implementation. (Double Linked List and HashMap)
Amazon Leadership Principles Questions. https://www.amazon.jobs/en/principles
Round 4(Bar Raiser Round F2F-Amazon chime):
Few Questions on Amazon leadership principlesGiven a string that represents covid patients we need to isolate(remove) each character in string in lexicographical orderCost of each isolation is equal to the index value of the characterExample 1: 
Input : aacb  
Output : 1+1+2+1=5Use Double linked list for altering and the hashmap for character frequency.
Few Questions on Amazon leadership principles
Given a string that represents covid patients we need to isolate(remove) each character in string in lexicographical orderCost of each isolation is equal to the index value of the characterExample 1: 
Input : aacb  
Output : 1+1+2+1=5Use Double linked list for altering and the hashmap for character frequency.
Cost of each isolation is equal to the index value of the character
Example 1: 
Input : aacb  
Output : 1+1+2+1=5
Use Double linked list for altering and the hashmap for character frequency.
Round 5(Hiring Manager-Amazon Chime):
Few Questions on Amazon leadership principlesGiven an array of Integers find the pair whose sum is farthest from zero.some variations on the above question
Few Questions on Amazon leadership principles
Given an array of Integers find the pair whose sum is farthest from zero.
some variations on the above question
Finally, After 5 Rounds I got a Mail from HR stating my Selection.
Amazon
Marketing
Interview Experiences
Amazon
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Comments
Old Comments
Amazon Interview Experience for SDE-1 (On-Campus)
Amazon Interview Experience for SDE-1
Amazon Interview Experience for SDE1 (8 Months Experienced) 2022
Microsoft Interview Experience for Internship (Via Engage)
Amazon Interview Experience (Off-Campus) 2022
Amazon Interview Experience for SDE-1
Amazon Interview Experience for SDE-1(Off-Campus)
Google Interview Experience for IT Support Engineer
Microsoft Interview Experience for SDE-1 (Hyderabad)
Google Interview Experience SDE-1 (Off-Campus) 2022