Amazon Interview Experience | Set 274 ( On-Campus)

Round 1: (Online in Hackerrank)

20 MCQ questions based on outputs, DS, OS, DBMS.

  1. Print all possible words from phone digits
  2. Given a matrix where elements are inserted as 1 to n in row 0, n+1 to 2n in row 1 and so on till n^2 and you traverse the matrix in spiral manner find the kth number you will visit.
    eg. n = 3
    matrix: 1 2 3
    4 5 6
    7 8 9k = 4, output: 6
    k = 6, output: 8

Round 2: (F2F)

  1. . Sort an array of 0’s,1’s and 2’s.
  2. Given a linked list like 10->8->3->4->5->6modify it to4->2->-1->4->5->6
    The last number is subtracted from first number, 2nd last from 2nd number and so on till middle of link list.
    First gave him a brute force approach O(N^2) , then O(N) approach in which reverse of 2nd half of list is done. He told to do this without reversing the list.
    Then used a stack and gave him final solution.

Round 3 : (F2F)

  1.  Given a number n and a pattern that follows like:(1 to 26): a,b,c,….z(27 to 52): aa,ab,ac,…az(52 to 78): ba,bb,bc,…bz…za,zb,zc,…zzaaa,aab,aac,…aazaba,abb,abc,……find the nth pattern
  2. Convert a Binary Tree to Doubly Link List in place
  3.  Clone a graph and analyze the time and space complexity. First did it using two traversals of BFS and using map. Then did it using one traversal of BFS and map.

Round 3:(F2F)

  1. Count the number of inversions in an array
  2. Tell a data structure which you will use to implement best fit algorithm. I told him BST. Then he asked me to implement it.
    https://www.geeksforgeeks.org/floor-and-ceil-from-a-bst/\
  3. Longest Common Subsequence (Both recursive and dp approach)
  4. Box stacking Problem
  5. One DBMS query select 2nd max salary from table,
  6. OS questions from deadlock, synchronization, scheduling, diff between process and thread.

Round 4:(Telephonic round)

  1.  About my summer internship
  2. OS, DBMS , OOPS questions \
  3. Row with max 1s
  4. What happens when you type URL in browser and hit enter? Explain in detail.
  5. Given a number in form of array and number K you have to form largest number after swapping elements K times.
    You can swap only adjacent elements
    e.g Array -> 4 5 7 8 2 3
    K=2
    Output -> 7 4 5 8 2 3
    Only algo was needed.

Thanks GeeksforGeeks. Placed@Amazon

Recruiter at amazon are very friendly. For each question working code was expected and time and space complexity was asked.
Interact with the interviewer if you get stuck. Try to come up to different approach to solve the same problem. Their main focus remains on how you see a problem and try to solve the problem. Dont jump to code it as soon as you are given the problem, first discuss it then go for coding if asked.
Be confident and do not give up if you cant get the perfect solution!!

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.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above


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.