Amazon Interview Experience (SDE 1)

I interviewed with Amazon for SDE 1 role in Bengaluru location. Overall I had 5 rounds.

  • First round was telephonic round with a codepair editor where I had to write the solution to the problem given.

    • Given a double number in range (0 to 10^18) find the sqrt of the number.
    • Given a number N, find all the prime numbers till N with memory optimized solution.
  • For the further rounds I was called onsite in Bengaluru. I had three rounds there. Second round was technical one.

    • Implement stack with push(), pop() and get_min() operation.
    • Print the top view of a binary tree.
    • Any problem in the current company which I had solved of my own.
  • Third round was also the technical one.

    • Resume based question
    • Given a matrix, a diamond is located at any cell of the matrix. Also there are K people in the matrix. Find out the people who will reach the diamond in shortest possible distance. Each people can travel in either left, right, up or down direction.(Used BFS)
    • There is a shuffled array consisting of N elements with values (1 to N inclusive). After removing one single element, the array is given back to you. Find the missing element.
  • In fourth round I was asked one design question and one backtracking question.

    • Design an employee details structure having his entire details such as type of employee(Contract or Full Type or can be extended futher), salary of employee, daily wage of employee, name, age. (OOPS design).
    • Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
  • Final round was hiring manger round

    • About myself and why I wanted to leave current company
    • There are two files of day1 and day2 each containing the entry of person name, timestamp and URL visited. Find out the person who has visited any url on both of the days. (Size of files could not be loaded in the memory at once). If you could load the file in memory how would you solve the problem. (Used unordered_set and trie to explain my approach).

Verdict : Selected

Comments (5)