Amazon Interview Experience | Set 149 (On-Campus for Internship)

Round 1 (Online):
It had 20 MCQs and 2 coding questions for 90 minutes. Questions were from Operating Systems, Data structures, Aptitude etc. Most of them were exactly same as on www.geeksquiz.com

In MCQs there was – 0.25 marking for every wrong answer and +1 for right answer. Coding questions were of 10 marks each.

Coding Questions:

 
Mobile-keypad



You are given n strings and you have to find their decimal representation. You have to print the string and corresponding decimal representation in descending order. For example, if you are given “amazon” then its corresponding decimal notation will be 262966. If more than one strings have same decimal notation then you have to print them in the order in which input is given. The given string consists of lower case alphabets only.

Test Case 1:
5
Amazon
Microsoft
Facebook
Aa
Bb

Output:
642767638  microsoft
32232665  facebook
262966  amazon
22 aa
22 bb


Round 2 (Face to Face):

Q1. Given a linked list, write a function to reverse every k nodes.

Example:
Inputs:  1->2->3->4->5->6->7->8 and k = 3 
Output:  3->2->1->6->5->4->8->7 

Inputs:   1->2->3->4->5->6->7->80 and k = 5
Output:  5->4->3->2->1->8->7->6

Q2. Given an array arr[] of integers, find out the maximum difference between any two elements such that larger element appears after the smaller number in arr[]. Print the indices of the two elements also.

Example: If array is [2, 3, 10, 6, 4, 8, 1] then returned value should be 8 (difference between 10 and 2). If array is [ 7, 9, 5, 6, 3, 2 ] then returned value should be 2 (difference between 7 and 9).

Round 3 (Face to Face):

There was brief introduction. Then he asked some questions from my resume. He asked me to tell about a project which I loved the most and felt proud after doing it successfully. He was interested in knowing the details of the implementation in that project.
After that there were 2 coding questions:
Q1. Given a string, find the longest substring without repeating characters. For example, the longest substrings without repeating characters for “ABDEFGABEF” are “BDEFGA” and “DEFGAB”.
Q2. Given a log file of page visits of a website by different users for a day.

Entry in the log file is like this:
User 1 visited Page 4
User 3 visited Page 2
User 7 visited Page 9
.
.
.

Design an efficient data structure which supports queries like the following:
Which page was visited by exactly 2 users in day?
Which page was visited by only one user exactly 2 times in a day?
Which page was visited by ‘User 3? more than 5 times in a day?

In 2nd and 3rd round, we had to write code on paper.
The overall interview experience was quite good. They wanted the most optimal solutions and gave hints to think in that direction.
I was finally selected 🙂
Tips:
  1. First explain the approach, then start coding. 
  2. Try to interact with the interviewer while coding on paper. They don’t want to get bored while interviewing.
  3. In case of any doubt, clarify it asap.
  4. Never ignore the hints given by the interviewer.
  5. Be 100% honest.

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.


Write your Interview Experience or mail it to contribute@geeksforgeeks.org



My Personal Notes arrow_drop_up


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.