i
Amazon
Proud winner of ABECA 2025 - AmbitionBox Employee Choice Awards
Filter interviews by
Given a positive integer 'N', representing the number of tasks, and a list of dependency pairs, determine if it is possible to complete all tasks considering these...
Given tasks and dependencies, determine if all tasks can be completed based on prerequisites.
Create a graph representation of tasks and dependencies.
Use topological sorting to check if there is a cycle in the graph.
Return 'Yes' if no cycle is found, 'No' otherwise.
The objective is to transform a given Binary Search Tree (BST) into a right-skewed BST, effectively flattening it into a sorted list. In the resulting structure, every node's l...
Transform a Binary Search Tree into a right-skewed BST, flattening it into a sorted list.
Implement a function to flatten the BST into a sorted list by linking nodes through right children.
Traverse the BST in-order and adjust the pointers to create the right-skewed structure.
Ensure that every node's left child is NULL in the resulting flattened BST.
Output the values of nodes in the skewed BST in level order for eac...
Given a Binary Search Tree of integers, transform it into a Greater Sum Tree where each node's value is replaced with the sum of all node values gre...
Convert a Binary Search Tree to a Greater Sum Tree by replacing each node's value with the sum of all node values greater than the current node's value.
Traverse the BST in reverse inorder (right-root-left) to visit nodes in descending order.
Keep track of the running sum of visited nodes and update each node's value with this sum.
Modify the BST in place without creating a new tree.
Example: For input 11 2 29 1 7 15 ...
Imagine there are 'N' people at a party, each assigned a unique ID from 0 to N-1. A celebrity at the party is a person who is known by everyone but knows no one else.
Identify the celebrity at a party where one person knows everyone but is not known by anyone.
Use a two-pointer approach to eliminate non-celebrity candidates.
Start with two pointers at the beginning and end of the party.
If A knows B, A cannot be the celebrity; move A to B.
If A does not know B, B cannot be the celebrity; move B to A.
Repeat until only one person remains; check if this person is known by everyone.
Ret...
What people are saying about Amazon
Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.
The first line of input is an integer...
Reverse a singly linked list by altering the links between nodes.
Iterate through the linked list and reverse the links between nodes
Use three pointers to keep track of the previous, current, and next nodes
Update the links while traversing the list to reverse it
Return the head of the reversed linked list
You are provided with an integer X
and a non-decreasing sorted doubly linked list consisting of distinct nodes.
Your task is to find and return the count of t...
Count triplets in a sorted doubly linked list that sum up to a given value.
Iterate through the list and for each node, find pairs that sum up to X-nodeValue.
Use two pointers approach to find pairs efficiently.
Keep track of count of triplets found while iterating through the list.
You are provided with a matrix containing 'N' rows and 'M' columns filled with integers. Each row is sorted in non-decreasing order. Your task is to find the overall median ...
Find the overall median of a matrix with sorted rows.
Merge all elements of the matrix into a single sorted array
Calculate the median of the merged array
Handle odd number of elements by directly finding the middle element
Given a binary tree of integers, your task is to print the boundary nodes of this binary tree in an anti-clockwise direction starting from the root node.
...Print the boundary nodes of a binary tree in an anti-clockwise direction starting from the root node.
Traverse the left boundary nodes in a top-down manner
Traverse the leaf nodes from left to right
Traverse the right boundary nodes in a bottom-up manner
Avoid duplicates while printing the boundary nodes
You are provided with a square matrix 'MAT' of order N. Your task is to determine the number of non-empty sub-matrices where the sum of all elements within the ...
Count the number of sub-matrices with sum zero in a square matrix.
Iterate over all possible sub-matrices and calculate the sum of elements within each sub-matrix.
Use a hashmap to store the prefix sum of rows or columns to efficiently calculate the sum of sub-matrices.
Check for sub-matrices with sum zero and increment the count accordingly.
Return the total count of sub-matrices with sum zero.
You are given a 2D grid consisting of 'N' rows and 'M' columns. Each cell in the grid has a certain cost associated with passing through it. Your goal is to find the minimum co...
Find the minimum cost to travel from top-left to bottom-right corner of a grid.
Use dynamic programming to keep track of minimum cost to reach each cell.
Start from top-left corner and iterate through the grid to calculate minimum cost.
Consider all possible movements (UP, DOWN, LEFT, RIGHT) while staying within grid boundaries.
Update the cost for each cell by considering the minimum cost of reaching adjacent cells.
T...
I appeared for an interview in Dec 2024, where I was asked the following questions.
I applied via LinkedIn and was interviewed in Sep 2024. There were 2 interview rounds.
Easy Questions- Can be done with decent practice
Coding test had 2 medium level coding questions
I applied via Approached by Company and was interviewed in Aug 2024. There were 2 interview rounds.
2 coding questions of easy to medium difficulty
Sliding window problem where you can only pick fruits from two different baskets
Use a sliding window approach to keep track of the maximum number of fruits in two baskets
Keep track of the types of fruits and their counts in the window
Update the window by removing fruits from the beginning and adding fruits from the end
Keep track of the maximum number of fruits seen so far
I applied via Campus Placement and was interviewed in Aug 2024. There were 2 interview rounds.
2 leetcode easy problems, arrays and strings.
Find the smallest substring in a string that contains all characters of another string.
Use two pointers to maintain a sliding window over the string.
Count characters in the target string using a hash map.
Expand the window by moving the right pointer and contract it by moving the left pointer.
Example: For s = 'ADOBECODEBANC' and t = 'ABC', the result is 'BANC'.
Keep track of the minimum length and starting index of valid...
Find the minimum sum of a subarray within an array of integers.
Iterate through the array and keep track of the current sum of subarray
Update the minimum sum if a smaller sum is found
Consider using Kadane's algorithm for an efficient solution
I appeared for an interview in Mar 2025, where I was asked the following questions.
BFS (Breadth-First Search) is an algorithm for traversing or searching tree or graph data structures level by level.
Level Order Traversal: BFS explores all neighbors at the present depth prior to moving on to nodes at the next depth level.
Queue Data Structure: BFS uses a queue to keep track of nodes to be explored, ensuring nodes are processed in the order they are discovered.
Shortest Path: In unweighted graphs, BFS ca...
I applied via Approached by Company and was interviewed in May 2024. There were 2 interview rounds.
It had very basic dsa problem I don't not remember the exact question. It was based on array manipulation.
The Rotten Oranges problem involves determining the time taken for all oranges to rot in a grid.
Model the grid as a graph where each cell represents an orange.
Use BFS to simulate the rotting process, starting from all initially rotten oranges.
Count the minutes taken for all reachable fresh oranges to rot.
Example: In a 2D grid, rotten oranges spread to adjacent fresh oranges every minute.
I applied via LinkedIn and was interviewed in Jun 2024. There were 2 interview rounds.
Basic aptitude and data structures along with some personality based questions
The sliding window algorithm efficiently solves problems involving contiguous subarrays or substrings.
Used to find maximum/minimum in a subarray of fixed size. Example: max sum of any 3 consecutive elements.
Helps in counting distinct elements in a substring. Example: count of unique characters in 'abcabc'.
Can be applied to problems like longest substring without repeating characters. Example: 'abcabcbb' -> 'abc'.
Use...
Binary search is an efficient algorithm for finding an item from a sorted list of items.
Binary search works on sorted arrays. Example: [1, 2, 3, 4, 5].
It divides the search interval in half. If the target is less than the middle element, search the left half.
Time complexity is O(log n), making it faster than linear search (O(n)).
Example: To find 3 in [1, 2, 3, 4, 5], check middle (3), found it immediately.
If the target...
LC Medium - 2 questions
Two-pointer technique is used to solve problems involving arrays or linked lists by using two pointers to traverse the data structure.
Start with two pointers at different positions in the array or linked list
Move the pointers based on the problem requirements (e.g. one pointer moves faster than the other)
Commonly used in problems like finding a pair of elements that sum up to a target value
I applied via Referral and was interviewed in Mar 2024. There was 1 interview round.
Some of the top questions asked at the Amazon Software Developer Intern interview -
The duration of Amazon Software Developer Intern interview process can vary, but typically it takes about 2-4 weeks to complete.
based on 43 interview experiences
Difficulty level
Duration
based on 91 reviews
Rating in categories
Customer Service Associate
4.1k
salaries
| ₹0.6 L/yr - ₹7.8 L/yr |
Transaction Risk Investigator
3.1k
salaries
| ₹2 L/yr - ₹6.3 L/yr |
Associate
3k
salaries
| ₹0.8 L/yr - ₹7 L/yr |
Senior Associate
2.6k
salaries
| ₹1.8 L/yr - ₹9 L/yr |
Software Developer
2.3k
salaries
| ₹24.8 L/yr - ₹44.2 L/yr |
Flipkart
TCS
Netflix