Open In App

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

Round 0: (Written): 20 MCQs + 2 Coding Questions:

MCQs – Topics:



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.

  1. Reverse a linked list.
    • 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:

ALL THE BEST :):)

Thanks GeeksforGeeks for all the material, it helped me a lot during preparations.  Keep it up !!

 

Article Tags :