Amazon Interview Experience | Set 145 (Off-Campus)
I have been working with Amazon for last 2 years and 4 months. Here, is my interview experience when I was the interviewee:
Off Campus Drive (DCE) – 2012
Become a success story instead of just reading about them. Prepare for coding interviews at Amazon and other top product-based companies with our Amazon Test Series. Includes topic-wise practice questions on all important DSA topics along with 10 practice contests of 2 hours each. Designed by industry experts that will surely help you practice and sharpen your programming skills. Wait no more, start your preparation today!
1-> WAP to merge two linked lists like:
list1: 1->2->3->4 list2: 5->6->7 o/p list: 1->5->2->6->3->7->4
1->You are given a sorted but rotated array of integer like: 6 7 8 1 2 3 4 5 You have to search an element...
I answered with an O(logn) solution…
then he asked me to write the code…
2->What is the diameter of a tree?
then he asked me to write the complete code…
3->He asked me a design problem “you have to design a class “DeckofCards”…with 2 operations: 1:Shuffle 2:Pick”
Pick would pick a random card from the deck and Shuffle will shuffle the cards and give you back the deck of cards.
I answered with 2 options 1.LinkedList 2:Array…then there was a discussion around 15 mins over both the solutions…
Round 2:(I guess it was the bar-raiser round)
1-> My Introduction and My Projects (all 1 by 1 except the last)
2-> How to compute all possible solution of A^3+B^3=C^3, where A,B,C belongs to (0 to N)?
3-> How to compute A^n where n<1 million Write code... 4-> A tough “matrix with a mask” problem…I took around 20 mins to solve it.
5-> Why Amazon, what is scalability and questions from my answers…like how would you manage millions of requests…
eg: i/p: 1 1 1 1 o/p : 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1
2-> How to find a largest palindrome from a given string? Write code….
3-> How many Data Structures you have implemented by yourself?
4-> Given some words(written in lexical order) of some unknown language…You have to find lexical ordering of all the alphabets…
Like in english lexical ordering is A B C…Z
Forth round was just related to my projects and subjects…(Paging, Deadlock, Trashing, JAVA and C, Synchronization, etc) + 1 final algo question “How to find all anagrams in a dictionary” Solution was in O(1)..
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.