# Amazon Interview Experience | Set 301(On-Campus for Internship+ FTE)

Round 0: (Written): 20 MCQs + 2 Coding Questions: MCQs –Â Topics:
• OS – Page fault, Waiting time (RR Scheduling), Paging, Semaphores, etc.
• DS â€“ Hashing (simple chaining based numerical)
• Aptitude â€“ 1 Probability question, Puzzle â€“ 1 question, Câ€“ 2 questions, etc.
Coding Questions:
1. Given a list of n strings group all anagrams together Example: i/p: cat act pat mad dog god o/p: cat act pat mad dog god
2. Given a binary square matrix of size n, find the size of largest region i.e. find a region of connected ones (horizontally, diagonally, vertically).Example: i/p: 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 0Â  o/p: 5
DAY 2:Â (Interview Rounds) Round 1 (Technical InterviewÂ –Â 1 hr. approx.) The Interview started with the interviewer telling me that we donâ€™t have much time so he will ask few questions on data structures and algorithms and I will need to tell him the approach.
• I gave two approaches, one using stack and one using pointers (in-place).
2. Print top view of a binary tree.
• Â Well simple question but donâ€™t know why I started using DFS approach (Pre-Order Traversal)
• Â Tried using pre-order but he gave me test cases where it failed.
• Â Tried different approaches within pre-order found issues with one or the other test cases and I was also using HashMap to keep track of nodes to print.
• So he asked me to do it without auxiliary storage.
• I tried level order approach (w/o auxiliary HashMap)and it worked fine for all test cases.
• He was satisfied with the approach, so asked me to write production level code.
Round 2 (Technical InterviewÂ – 45mins. approx.) The interviewer introduced himself briefly and asked me to introduce myself. No follow up questions from the introduction (although I was hoping something on projects or company :P).
1. Find Kth Max occurring element in the Array.
• Used HashMap and Heap to solve the question.
• Time O(n*logn)
2. DP question: Special Keyboard
Round 3 (Technical Interview – Â 45 mins. approx.) The interviewer introduced himself briefly and asked me to introduce myself. No follow up questions from the introduction again. He gave me a string based question and asked me if I knew it already (which I didnâ€™t), so he asked me to come up with an approach.
Round 4 (Technical InterviewÂ –Â 25mins. approx.) Short round as it was my last round. Only one question:
• Given an infinite integer number line, find minimum steps required to reach a particular point. 0 is the starting point and at ith step we can move +i or -i steps from current position. Tried using tree and realised it is DP problem told him the approach and complexity and why DP and why BFS (to get minimum steps).He was satisfied with the approach.
ALL THE BESTÂ :):) Thanks GeeksforGeeks for all the material, it helped me a lot during preparations. Â Keep it upÂ !!

Previous
Next