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 https://www.w3wiki.net/.
In MCQs there was – 0.25 marking for every wrong answer and +1 for right answer. Coding questions were of 10 marks each.
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
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):
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?
I was finally selected ?
- First explain the approach, then start coding.
- Try to interact with the interviewer while coding on paper. They don’t want to get bored while interviewing.
- In case of any doubt, clarify it asap.
- Never ignore the hints given by the interviewer.
- Be 100% honest.
Contact Us