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.
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):
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):
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.
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.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.