Open In App

Amazon Interview Experience for SDE 1 (On-Campus)

Last Updated : 28 Sep, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

Round 1: Coding round

  • Code Debugging (20 minutes)
  • Coding questions (70 minutes): There were 2 coding questions:
    Maximum of all subarrays of size K
    Count all substrings with at most K distinct characters
  • Workstyle assessment (20 minutes): MCQ to assess your behavior and your attitude
  • Reasoning ability section (35 minutes): basic aptitude questions

Round 2: Technical Interview Round 1
Time: 1hr

I was asked to introduce myself and then he asked me 2 coding problems:

  • Given 4 digits, make the largest time in 24 hr format. I initially came up with a greedy solution using backtracking. Although this solution was right, the interviewer asked me to think of another logic as this one was slightly complicated to code with too many conditions. He gave me a hint by saying focus on the number of digits. It then struck me that I can simply find all the permutations of these digits and find the maximum valid time. He was satisfied with this approach and asked me to code it.
  • Evaluate division. I was quickly able to come up with a solution using graphs. I was then asked to write a code.

We also discussed the time and space complexities for each of the above problems.

Round 3: Technical Interview Round 2
Time: 1.5hr

The interviewer asked me to introduce myself. Then he shifted to coding problems:

  • Given N people’s entry time and exit time to a shop. You will then get Q queries. In each query, there will be a timestamp. You need to tell the number of people present in the shop at that timestamp. He also told me that Q will be pretty large.
  • The obvious approach was to do some preprocessing that will help me to answer each query efficiently. So based on this, I told him 2 approaches with space complexity O(N) and each query could be answered in O(1). He then asked me to come up with a solution with O(1) space complexity. After thinking for some time, I came up with the following logic:
    In the preprocessing step, just sort the entry time and exit time arrays.
    Now for each query, we just need to perform a binary search to calculate the answer.
    The interviewer was satisfied with this approach and asked me to code it.
  • Create a data structure that performs the following operations in O(1):- insertion, deletion, if exists, get random value. I struggled with this problem for some time. He then gave me some hints. After that, I was able to get the solution. He then asked me to quickly code the solution.
  • After these two questions, he started asking me about my project. He asked me some basic questions like:
  • Describe your project
  • What challenges did you face?
  • Did you learn anything while developing the project?
  • How did you collaborate with other members of the team?
  • What technologies were used to develop this project?

Round 4: Technical Interview Round 3
Time: 1hr

  • I was first asked to introduce myself. After this, we had a 15min discussion on my internship followed by a 15min discussion on my projects. Then he asked me a coding question involving OOPS concepts: Let’s say that you are the author of a library ‘Canvas’ that is used to make polygons based on the given coordinates. Assume that you have already implemented the ‘drawing function. Now, how will I add extra functionalities that are capable of drawing any N-sided polygon? Also, he wanted this library to be implemented in such a way that the user is able to override some of its functionalities. We discussed this problem for some time and I came up with an approach using normal logic and some OOPS concepts. He was satisfied with my approach.

I was offered FTE+Intern.

Tip:

  • Make sure that you convey your ideas effectively to the interviewer. Also, listen to the interviewer carefully when he is saying something. There is a high probability that he wants you to think in a particular direction.

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

Similar Reads