Amazon Interview | Set 72 (Off campus for SDE-1)
Amazon Interview (Off campus for SDE-1)
Experience: 8 months
Interview Process – 2 (telephonic) + 3 (f2f – Bangalore) + 1 bar raiser (telephonic)
Telephonic 1 (25 minutes only)
Q1. Two strings s1 and s2 are given; find a minimal length substring in s1 which does not contain s2 as a substring. (Do include all edge cases)
Q2. Swap all nodes of a linked list with their next nodes.
Hey geek! It's time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!
Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsft, TCS, Wipro, Google and many more!
Telephonic 2 (65 -70 minutes)
Q1. An integer array of size n is A given, find the three numbers s.t. A[i] > A[j] > A[k] and I < j < k.(algo only)
Q2. An array of integers is given, trim the array such that 2*min > max. min and max are the minimum and maximum elements of the array. You can remove elements either from start or from end of the array if above condition does not meet. No of removals should be minimum. (algo + code)
For example a, b, c, d, e f are the elements of array, c is the min num and e is max no
condition 2*c > e is true then we are done but if false then remove either from start i.e. a,b,c or from end i.e. e, f such that new min or max would satisfy the condition and removals should be minimum.
Q3. A sorted array of integers and a number K is given, find the closet number to K. (algo only)
F2F 1 (60 minutes)
Brief introduction about my self and my work experience in current company
Q1. Equilibrium Point in an integer array (sum of left side elements should be equal to sum of right hand side elements)
Q2. Extend above for multiplication (multiplication of left side elements equal to multiplication of right side elements)
(special case of Zero and some discussion on arithmetic exception and range bound errors)
F2F 2 (60 – 65 minutes)
Some general introductory questions; why are looking for a change and work experience.
Q1. For a given number K, print all pairs of valid parenthesis combination and return the total count of such combinations.
Q2. There are n balls kept on a table and connected in random fashion but there is no cycle (no back edge). Write the code to select a ball such that after lifting the whole structure from that ball height will be minimum. (algo+code+ mathematical proof of correctness)
Q3. Difference b/w http and https.
Q4. Suppose you are handling Amazon website and you have 10 MB size home page. Optimize the homepage for a customer who has 100 kbps internet connection.
Further he asked for the customer who has 100 mbps internet connection.
F2F 3 (with Hiring manager, 80-90 minutes)
Lots of discussion about current project. He will ask you everything from bottom level to your contribution.
Q1. Implement memcpy (*src,*target) function.
Q2. Reverse contents of a linked list.
Q3. I code in java so lots of question on oops and java like swing and awt difference , vector and array list difference , interface and abstract classes.
Q4. Client and server code in chat window, background process in server and network, networking layers.
Q5. Process and threads and code for thread safe situation (take an example and explain)
Bar raiser (Telephonic one hr)
Hr Question like biggest challenge so far, projects, why are you looking for a change, why amazon, biggest mistake.
Q1. Given flat files (for an entire year, 1 per day) of train schedules (arrival and departure times at a given station) find Min platforms required to accommodate the trains in that station.(algo only)
Q2. I want to write a ransom note. But I don’t want to write it by hand, I’m going to cut letters out of a magazine. How can I tell if the magazine has enough of the right words to spell out the note I want to write? Let’s assume we have a way to digitize the text of the magazine. (algo only )
I asked him about Amazon kindle and Amazon instant video. Show him that you know lot about amazon.
Advice for Amazon: except from all data structure, read Trie data structure very well and how to process big data.
Next day I got call from HR that I am Hired 🙂 🙂
Thanks a lot to geeksforgeeks team.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.