i
Amazon
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
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 Company Website and was interviewed in Jan 2024. There was 1 interview round.
I applied via campus placement at Graphic Era University, Dehradun 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.
What people are saying about Amazon
Interview experience
based on 2 reviews
Rating in categories
Customer Service Associate
4.2k
salaries
| ₹0.6 L/yr - ₹5 L/yr |
Transaction Risk Investigator
3.1k
salaries
| ₹2.3 L/yr - ₹6.5 L/yr |
Associate
2.5k
salaries
| ₹0.8 L/yr - ₹6.5 L/yr |
Senior Associate
2.4k
salaries
| ₹2 L/yr - ₹10.1 L/yr |
Software Development Engineer
2k
salaries
| ₹18.1 L/yr - ₹34.7 L/yr |
Flipkart
TCS
Netflix