Open In App

Amazon Interview Experience | Set 352 (For SDE I)

Last Updated : 10 Jul, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

1) Online coding round of 45 minutes. We had a question where we had to read an unknown number of lines from a data file. Each line had a formatted date time stamp and a person’s name.
We were supposed to tell if some person had appeared twice on the same date or not. For C++, i used getline to take the input and then STL Map did the trick.

2) Onsite Face to Face Round 1
The interviewer asked me two questions and then I coded them after discussions:
He wanted to understand the logic behind the approach rather than just intuition. He asked for proof of the algorithm in the sense that why this works.

  1. Trapping rain water
  2. Print nodes at k distance from nodes

3) Onsite Face to Face Round 2

  1. He asked me about my internships and projects.
  2. Then he asked me how to design a calculator. This involved discussions on exception handling etc.
  3. He asked me about postfix and prefix expressions and how to use expression trees etc.
  4. Edit distance

4) Onsite Face to Face Round 3

  1. The first question was this:
    Rearrange characters in a string such that no two adjacent are same
    He gave me input constraints of length of string as 10^5.
  2. Then we discussed about detecting cycles in a graph. Can we use a BFS to detect a cycle in a directed graph? He asked me to code cycle detection for a directed graph.
    GeeksforGeeks Link
  3. The last question was this:
    You are given a binary 2 dimensional array, find the area of the largest rectangular submatrix which has 1s only.
    GeeksforGeeks Link
    He was not convinced with the my approach and asked me to give him test cases where this will fail. We made ten – fifteen cases and tested and it seemed to work.

5) Bar Raiser (Skype):

    He wanted me to code a data structure for an auto-completing a search query. I mentioned Trie is a way and then we had discussions on Trie and search, insert etc in a Trie.
    Then he asked me to code it using a Trie:

  1. GeeksforGeeks Link
  2. Then we discussed about databases. What are normal forms?
  3. How will you design a database with books and authors (many to many relationship).
  4. How do we query for the author with the maximum number of books?
  5. What is a deadlock and what are ways to avoid it?
  6. Give me a real life example of a deadlock.
  7. Explain to me any single project in which you had to meet a deadline and what was your course of action?

There was one more round after this and that was the Bar Raiser actually. The 5th point mentioned in the initial post was just a technical interview.

  1. He asked me why amazon?
  2. Have i ever been in a situation where i went against my mentor in a project and what was the result?
  3. How do i keep myself motivated during tough projects?
  4. How to meet deadlines?
  5. How to make sure the work done by you in a project is easily understandable by a person after you leave the project?
  6. These were the coding questions: Convert infix to postfix and evaluate postfix.
    GeeksforGeeks Link He wanted me to assume nothing (the input string may not be valid and the code was to report so).

GeeksforGeeks helped me the most during my preparation time.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads