i
Amazon
Proud winner of ABECA 2025 - AmbitionBox Employee Choice Awards
Filter interviews by
I applied via Company Website and was interviewed in Jan 2024. There was 1 interview round.
I applied via Campus Placement and was interviewed in Dec 2023. There was 1 interview round.
To find a loop in a linked list, use Floyd's Cycle Detection Algorithm.
Use two pointers, slow and fast, to traverse the linked list.
If there is a loop, the fast pointer will eventually meet the slow pointer.
Once they meet, move one pointer back to the head and start moving both pointers one node at a time until they meet again.
I applied via Job Fair and was interviewed in Mar 2022. There was 1 interview round.
Reversing a linked list involves changing the direction of the pointers in the list.
Iteratively swap the next and previous pointers of each node in the list
Recursively reverse the rest of the list and then change the next pointer of the current node
Use a stack to push each node onto the stack and then pop them off to create the reversed list
Implement a stack with O(1) to get the min value.
Use two stacks, one for the actual values and one for the minimum values
Push the new value onto the value stack and compare it with the top of the minimum stack
If it's smaller or equal, push it onto the minimum stack as well
When popping a value, check if it's the minimum and pop from the minimum stack if so
Implement array with O(1) setAll to set all values to a given value.
Create an array of strings with a fixed size.
Create a variable to store the value to be set.
When setAll is called, assign the value to the variable.
When accessing any element of the array, return the value stored in the variable.
This approach ensures that all elements of the array are set to the same value in constant time.
I applied via Naukri.com and was interviewed before Nov 2020. There were 3 interview rounds.
What people are saying about Amazon
Solution to performing operations on a large array of bits.
Use bitwise operators to perform operations on individual bits
Use a loop to iterate through the array and perform the operations
Ensure that the array is large enough to accommodate all the bits
Consider using a data structure like a bitset for efficient bit manipulation
I applied via Campus Placement and was interviewed in Dec 2016. There were 4 interview rounds.
Given a 2D matrix with doors and walls, fill distance matrix with minimum distance to the nearest door.
Iterate through the matrix and find the doors
Use Breadth-First Search (BFS) to calculate the minimum distance from each cell to the nearest door
Update the distance matrix with the minimum distances
Find kth smallest element in unordered array with O(1) space
Use the QuickSelect algorithm to partition the array and find the kth smallest element
Choose a pivot element and partition the array into two subarrays
Recursively partition the subarray that contains the kth smallest element
Repeat until the pivot element is the kth smallest element
Time complexity: O(n) average case, O(n^2) worst case
To find friends of friends who are not already friends with you, we can first find your friends and then their friends excluding yourself and your friends.
Get your list of friends
For each friend, get their list of friends
Exclude yourself and your friends from the final list of friends of friends
based on 2 interview experiences
Difficulty level
Duration
based on 2 reviews
Rating in categories
Customer Service Associate
4.1k
salaries
| ₹1.8 L/yr - ₹5 L/yr |
Transaction Risk Investigator
3.1k
salaries
| ₹2.9 L/yr - ₹6.5 L/yr |
Associate
3.1k
salaries
| ₹2 L/yr - ₹5.5 L/yr |
Senior Associate
2.6k
salaries
| ₹4 L/yr - ₹9 L/yr |
Software Developer
2.3k
salaries
| ₹25.3 L/yr - ₹44 L/yr |
Flipkart
TCS
Netflix