Open In App

Amazon Interview Experience | Set 319 (On-Campus)

Last Updated : 08 Jul, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

Online Round:
There were 20 MCQs based on basic programming, C output questions, OS. There were 2 programming questions.
1. Given an array with only 1s and 0s, You have to maximize numbers of 1s in this array. You are allowed to do max one flip operation which can be applied to a range of continuous indexes. I used something like max sum contiguous subarray dynamic programming approach. This problem is similar to

2. You are given a linked list.for i=1 to n/2, subtract (n-i)th number from ith number. Print modified linked list in the end.

Technical round 1:
1. Given three numbers A, B and M. Calculate (A*B)%M. All numbers are in a range of 1 to 10^15 so prevent overflow. First I gave brute force approach for running a loop A times, each time adding B to the answer and taking the mod. Then, I improved from O(n) to O(logn) by calculating A*B/2 recursively and multiplying it by 2. The interviewer asked me to write complete code for it.

2. He asked me whether I know about trie data structure and I said yes so he asked me to write node structure of trie. I wrote the basic node structure. Then he asked me if I want to add and match exact strings then how would I modify node structure. I told him to add a boolean in the node signifying an end of the string. Then he asked me to write complete code for adding a string in trie root.
Technical round 2:
He asked me introduction and questions asked in previous interviews.
1. Given a binary tree, print the edge nodes of this binary tree.

2. You are given an array of contacts. Each contact consists 3 strings: name, email and phone number. If any of these parameters match with any other contact’s parameter then these 2 contacts are same. Find groups of same contacts. I suggested having a hashmap with parameter string as key and index as value. Then when we encounter matching strings in the hashmap, connect this 2 contact indexes as we do in Disjoint set Quick Union approach. In the end. find matching contacts using find operation.

Technical round 3:
This interview was mostly based on resume discussion. He asked me about my internships and projects and also asked me some OS questions. Then he gave me a chess problem. I am given initial positions of 8 pawns and a knight. I have to answer whether I can remove all 8 pawns using my knight. Then he simplified question and now only 1 pawn is there. I wrote full code for recursion to solve the problem but time complexity was exponential. Then he asked me how do I find the minimum number of steps in which I can remove this pawn. I modified my existing code to return a number of steps now.

Technical round 4:
This was kind of like HR round. Initially, he asked me about my latest internship work and started with specific questions. What was the toughest challenge I solved during any of my projects? What kind of problems you encounter when working in a team and how can those be resolved? Did you ever write non-maintainable code and why did you write it? Did it ever happen to you that you suggested some good approaches but they were thrown to trash by higher authority and how did you tackle with that?


Previous Article
Next Article

Similar Reads

Amazon Interview Experience | Set 351 (Off Campus - For SDE I)
I attended the referral drive in Delhi, so we had to report to 10:00 AM at Amazon's office. ROUND 1: Written – Pen & Paper (11:00 - 12:00 PM) You have to write a short description first of your approach, put comments if necessary to explain that line's logic. Full Optimize Code should be written covering all the edge cases. Also mention the com
5 min read
Amazon Interview Experience | Set 376 (On Campus for Internship)
Amazon visited our campus(Jadavpur University) to recruit interns and FTEs. I'm sharing my internship interview experience. There were 3 rounds in all – 1 Online Round followed by 2 F2F Interviews. Online Round(90 min on Hackerearth): There were 20 questions mostly based on C, C++, DS, Reasoning and a few from OS, OOPS, DBMS etc and 2 coding questi
5 min read
Amazon interview Experience | Set 413 (SDET-1 On-Campus Internship)
This was a pool campus conducted by amazon for internship. Online Round: There were 20 mcq(+1 for each) and 2 coding questions(+30 for each). MCQ had more networking and DS problems. Given three linked list, add them. GeeksforGeeks Link Input will be of this format 1->0->1 8->9->9 5 Output: 1->0->0->5 Solving above problem in p
3 min read
Amazon interview Experience | Set 416 (On Campus for Internship)
Coding Round There were 2 coding questions (10 marks each) and 20 MCQ’s from various core concepts ( OS,DS,Algorithms,DB,C language etc ). Question 1 : https://www.geeksforgeeks.org/given-a-string-print-all-possible-palindromic-partition/ Given a string, find all possible palindromic partitions of given string. Question 2 : You are given with a lar
4 min read
Amazon Interview Experience | Set 432 (SDET Off – Campus)
My friend in Amazon referred me for the job . I was approached by the HR and after lots of delay (1 month), I was scheduled a Telephonic Interview. Round 1: (Telephonic Interview ) - 1h  A screen was shared (Notepad) where I will be writing codes and doing other rough work. I was doing conversation with him on phone. Given n sized stairs and we can
4 min read
Amazon interview Experience | Set 129 (For SDE 1 Off-Campus)
In the recent past, I attended interview with Amazon. Here is my interview experience. Written Round: 1.5 hours 1. Given an array of integers, replace each element with the next immediate greater element. 2. Given a linked list, reverse each 3 nodes. 3. Given a tree, print all the nodes which are K distance from the leaf nodes. Face to Face Intervi
5 min read
Amazon interview Experience | Set 134 (Off-Campus for SDE)
I would like to start off by thanking the entire community of GeeksforGeeks for helping me out. Attempt 1 Round1: 1. Given a number N, find the number of correct combination of parentheses possible. Input: N=2 => ()() Output: 2 [(()),()()] Input: N=3 => ()()() Output: 5 [()()(),((())),(())(),(()()),()(())] 2. Print all root to leaf paths usin
3 min read
Amazon interview Experience | Set 135 (On-Campus for SDE)
Recently, Amazon visited our campus and I was interviewed for SDE position. Here is my Interview Experience: Online Round: (Duration – 90 minutes) 20 MCQs and 2 coding questions. MCQs were on Algorithms, Time Complexity, Quantitative Aptitude, Probability, Operating Systems, Graphs, Data Structures, Recursion outputs etc. Coding Questions: 1. In on
3 min read
Amazon interview Experience | Set 142 (Off-Campus for SDE-1)
Round 1: Telephonic Q1. Implement some functionalities of Minesweeper like connected component search and game termination check etc. Q2. Linked list random pointer question: Clone a linked list with next and random pointer Q3. Given a matrix of 0s and 1s find the row that contains maximum number of 1s. Q4. Given a node in a binary tree, find all t
3 min read
Amazon Interview Experience | Set 143 (Off-Campus for SDE-1)
Experience: 5 months F2F: 1st round 1. Tell me about your college project. 2. Write a Code to check if linked list is a palindrome without using extra space. 3. Write a Code to print zizzag traversal of tree. F2F: 2nd round 1. Tell me about your college project. 2. Tell me about your current project. 3. Nodes of a binary tree are randomly inserted
2 min read
Practice Tags :