Amazon interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Amazon
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
My journey as a software developer began in college, where I started learning programming languages like Java and Python. Initially, it was overwhelming, but I quickly found joy in solving problems and building projects. As I advanced, I explored web development with frameworks like React and Node.js and worked on personal projects and open-source contributions. Internships were pivotal, giving me real-world experience and helping me understand the software development lifecycle. To prepare for job interviews, I practised coding problems and engaged in mock interviews. On interview day, I treated it as a conversation, sharing my experiences and passion for the role. I hope my journey inspires others to embrace learning and persevere through challenges. Every step, no matter how small, contributes to your growth as a developer.
Application story
I began my application journey by researching companies that aligned with my values and interests in software development. I found a few job openings on LinkedIn and the companies' career pages that excited me. After tailoring my resume and cover letter to highlight relevant projects and skills, I submitted my applications online. I also leveraged my network, reaching out to connections who worked at these companies for insights and potential referrals. Once my applications were submitted, I received interview invitations within a few weeks. The process included initial screenings, technical assessments, and finally, the main interview. Throughout this journey, I focused on preparing by reviewing key concepts and practising coding challenges. The entire process was both challenging and rewarding, ultimately leading to the interview stage, where I was able to showcase my skills and passion for the role.
Why selected/rejected for the role?
I was selected for this role because my skills and experiences closely matched the job requirements. My solid foundation in programming, along with hands-on experience in relevant technologies, demonstrated my ability to contribute effectively to the team. Additionally, my enthusiasm for the company’s mission and my strong problem-solving abilities during the interview showcased my potential to thrive in the role.
Preparation
Duration: 10 months
Topics: Data Structures, Algorithms, System Design, Object-Oriented Programming, Databases.
Tip
Tip

Tip 1: Practice coding problems regularly on coding platforms to strengthen your problem-solving skills.

Tip 2: Start with the fundamentals of programming and focus on mastering one language before branching out to others.

Tip 3: Build small projects to apply what you’ve learned, as hands-on experience will reinforce your knowledge and boost your confidence.

Application process
Where: Referral
Eligibility: Above 7 CGPA, (Salary Package: 44 LPA CTC 22 Lakh Base)
Resume Tip
Resume tip

Tip 1: Customize your resume for each job application by highlighting relevant skills and experiences that align with the job description. This makes it easier for recruiters to see your fit for the role.

Tip 2: Ensure your resume is easy to read, with a clean layout, consistent font, and well-defined sections. Use bullet points to present your experiences succinctly, making it quick for hiring managers to scan your qualifications.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date1 Sep 2023
Coding problem2

There was a 3-day time window during which you could take the test anytime.

1. Consecutive Numbers

Easy
15m average time
90% success
0/40
Asked in companies
QualcommAmazon

You are given a positive integer ‘N’. Find the smallest positive integer ‘K’ such that (‘K’ XOR ‘K-1’) equals ‘N’.

Here ‘XOR’ denotes the bitwise XOR operator denoted by ^.

If no such ‘K’ exists, return -1.

Problem approach

Initialize the Board: Start with the 2D board and identify its dimensions.
Traverse the Board: Use nested loops to iterate through each cell in the board.
Check for Consecutive Elements: For each cell, check if it matches its neighbours (up, down, left, right) to find K consecutive elements of the same type.
Mark for Removal: If K or more consecutive elements are found, mark them for removal.
Remove Marked Elements: Iterate through the board again to remove the marked elements by setting them to a placeholder (like zero).
Collapse the Board: Shift the remaining elements down to fill in the empty spaces.
Repeat: Continue the process until no more elements can pop out.

Try solving now

2. Cousins of Given Node in Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
FlipkartPaytm (One97 Communications Limited)Samsung

Given a binary tree of N nodes and a node of this tree, you need to return a list containing the values of the cousins of the given node in the given binary tree sorted by non-decreasing order of their values.

Note:
Two nodes of a binary tree are cousins if they have the same depth or level, but have different parents.

No two nodes in the given binary tree will have the same data values.
Example :

Example Of Cousins

Problem approach

Breadth-First Search (BFS): Use BFS to traverse the tree level by level.
Track Parent and Depth: For each node, keep track of its parent and its depth in the tree.
Find the Nodes: As you traverse, look for the two target nodes whose cousin relationship needs to be checked.
Check Conditions: After finding both nodes, check if they have the same depth but different parents.
Return Result: Return true if they are cousins, otherwise return false.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date18 Sep 2023
Coding problem1

Timing:
The interviews were conducted in the morning from 10 to 11 AM.

Environment:
The atmosphere was professional yet relaxed, with friendly interviewers that helped reduce nerves.

1. Search In Rotated Sorted Array

Moderate
30m average time
65% success
0/80
Asked in companies
Tata 1mgWalmartDelhivery

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].

After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.

For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Note:

Can you solve each query in O(logN) ?
Problem approach

Step 1: I first identified that the array is sorted but rotated, which means the search could leverage binary search principles.
Step 2: I implemented a modified binary search algorithm to determine the pivot and search for the target value.
Step 3: I divided the array into two parts at the pivot and checked which part was sorted to decide where to continue the search.
Step 4: The interviewer was pleased with this efficient O(log N) approach.

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date23 Sep 2023
Coding problem1

1. Circular Tour

Easy
35m average time
85% success
0/40
Asked in companies
AdobeMicrosoftExpedia Group

You have been given a circular path. There are N petrol pumps on this path that are numbered from 0 to N - 1 (Both inclusive). Each petrol pump has two values associated with it:

1)The amount of petrol that is available at this particular petrol pump.

2)The distance to reach the next petrol pump.

You are on a truck having an empty tank of infinite capacity. You can start the tour from any of the petrol pumps. Your task is to calculate the first petrol pump from where the truck will be able to complete the full circle or determine if it is impossible to do so.

You may assume that the truck will stop at every petrol pump and it will add the petrol from that pump to its tank. The truck will move one kilometre for each litre of petrol consumed.

Problem approach

Step 1: I started by iterating through the array to calculate the total petrol and total distance required for the tour.
Step 2: I checked if the total petrol was greater than or equal to the total distance; if not, the tour was impossible.
Step 3: I implemented a greedy approach to find the starting point by maintaining a current petrol balance and resetting it whenever it dropped below zero.
Step 4: The interviewer appreciated the efficient O(N) solution using a single pass through the array.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which SQL keyword removes duplicate records from a result set?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Amazon
1516 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
1510 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
772 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
3509 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
52130 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Samsung
11504 views
2 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Google
10216 views
0 comments
0 upvotes