i
Amazon
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I appeared for an interview in Dec 2020.
Round duration - 60 Minutes
Round difficulty - Easy
3 coding questions and the duration of the test was 90 mins
You are provided with two sorted linked lists. Your task is to merge them into a single sorted linked list and return the head of the combined linked list.
...Merge two sorted linked lists into a single sorted linked list without using additional space.
Create a dummy node to start the merged list
Compare the nodes of both lists and link them accordingly
Move the pointer to the next node in the merged list
Handle cases where one list is empty or both lists are empty
Time complexity: O(n), Space complexity: O(1)
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N ma...
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Explore all possible directions ('U', 'D', 'L', 'R') from each cell.
Terminate the search when the destination cell is reached.
Return the list of valid paths sorted in alphabetical order.
Given an array of integers ARR
of length N
and an integer Target
, your task is to return all pairs of elements such that they add up to the Target
.
The first line ...
Given an array of integers and a target, find all pairs of elements that add up to the target.
Iterate through the array and for each element, check if the complement (target - current element) exists in a hash set.
If the complement exists, add the pair to the result. If not, add the current element to the hash set.
Handle cases where the same element is used twice in a pair to avoid duplicates.
Return (-1, -1) if no pair...
Round duration - 60 Minutes
Round difficulty - Easy
Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This...
Find the length of the longest strictly increasing subsequence in an array of integers.
Use dynamic programming to keep track of the longest increasing subsequence ending at each element.
Initialize an array to store the length of the longest increasing subsequence ending at each index.
Iterate through the array and update the length of the longest increasing subsequence for each element.
Return the maximum value in the ar...
Given a binary tree of integers, your task is to return the boundary nodes of the tree in Anti-Clockwise direction starting from the root node.
The first line ...
Return the boundary nodes of a binary tree in Anti-Clockwise direction starting from the root node.
Traverse the left boundary nodes in top-down order
Traverse the leaf nodes from left to right
Traverse the right boundary nodes in bottom-up order
Handle cases where duplicates occur in the boundary nodes
Implement the function without printing as printing is already managed
You are given a N x M
matrix of integers. Your task is to return the spiral path of the matrix elements.
The first line contains an integer 'T' which denotes the nu...
The task is to return the spiral path of elements in a given matrix.
Iterate through the matrix in a spiral path by keeping track of boundaries.
Print elements in the order of top, right, bottom, and left sides of the matrix.
Handle cases where the matrix is not a square matrix separately.
Consider edge cases like single row or single column matrices.
Round duration - 50 Minutes
Round difficulty - Medium
This was the last round, which consists of some basic hr questions and theory questions.
Tip 1 : Single page resume but brief
Tip 2 : Be calm and confident
Tip 3 : Solve previous interview questions of Amazon
Tip 1 : Don't make resume too lengthy.
Tip 2 : Mention your achievements in resume if any
I appeared for an interview in Dec 2020.
Round duration - 70 Minutes
Round difficulty - Easy
It was on Amcat , test was of 70 mins as far as I remember, timing was flexible , we were given a slot to attempt.
You are given an N * N matrix of integers where each row and each column is sorted in increasing order. Your task is to find the positi...
Given a sorted N * N matrix, find the position of a target integer 'X'.
Iterate over rows and columns to search for the target integer 'X'.
Utilize the sorted nature of the matrix to optimize the search process.
Return the position of 'X' if found, else return '-1 -1'.
Given two binary trees, T and S, determine whether S is a subtree of T. The tree S should have the same structure and node values as a subtree of T.
Given two binary trees T and S, determine if S is a subtree of T with the same structure and node values.
Traverse both trees and check if S is a subtree of T at each node
Use recursion to compare subtrees
Handle edge cases like empty trees or null nodes
Round duration - 50 Minutes
Round difficulty - Medium
It was a virtual interview.
Happend at 1 pm .
Two interviewers were there.
The platform was Chime ( Amazon's internal tool )
There was no language support, just a text editor and no facility to run the code.
Given an integer N
, find all possible placements of N
queens on an N x N
chessboard such that no two queens threaten each other.
A queen can attack another queen if they ar...
The N Queens Problem involves finding all possible placements of N queens on an N x N chessboard without threatening each other.
Use backtracking algorithm to explore all possible configurations.
Keep track of rows, columns, and diagonals to ensure queens do not threaten each other.
Generate all valid configurations and print them as specified in the output format.
You are given a binary tree consisting of 'N' unique nodes and a start node where the burning will commence. The task is to calculate the time in minutes required to completely b...
Calculate the time in minutes required to completely burn a binary tree starting from a given node.
Start burning from the given node and spread fire to adjacent nodes each minute
Track the time taken for each node to burn and return the maximum time taken
Use a queue to keep track of nodes to be burned next
Round duration - 50 Minutes
Round difficulty - Medium
It happened the same day at 4pm
Same environment, same chime link .
Two interviewers were there.
They jumped right into Coding question without any intro and discussion.
Given a binary tree, determine and return its bottom view when viewed from left to right. Assume that each child of a node is positioned at a 45-degree angle from its parent.
N...
Given a binary tree, return the bottom view of the tree when viewed from left to right.
Calculate the horizontal distance of each node relative to the root.
For each horizontal distance, keep track of the bottom-most node.
If two nodes share the same horizontal distance, choose the deeper node.
Return the sequence of bottom view nodes from left to right.
Tip 1 : Time management as OA is very much dependent on speed
Tip 2 : Preparing Famous questions beforehand
Tip 3 : Mock interviews to improve communication
Tip 1 : Good format to utilize maximum space tidily
Tip 2 : Mention projects with tech stack underlined and along with live links
I appeared for an interview in Dec 2020.
Round duration - 180 Minutes
Round difficulty - Hard
This was an online technical round on the SHL platform. The link of the test was shared to us around 3 PM.
There were 4 sections and each section had limited time. You can NOT go back to the question you have already attempted.
The webCam was not on.
Section 1: Automata/ Debugging
Section 2: Coding
Section 3: Amazon Principles/Personality Based
Section 4: Aptitude/Verbal
Ninja has studied the bitwise operations ‘AND’ and ‘XOR’. He received an assignment that involves these operations and needs help to complete it efficiently before ...
Calculate bitwise 'AND' and 'XOR' of subarrays of size at most K in an array efficiently.
Iterate through all subarrays of size at most K and calculate bitwise 'AND'.
Calculate the 'XOR' of all the bitwise 'AND' results to get the final output.
Optimize the solution to handle large input sizes efficiently.
In a network with 'N' system nodes, identified from 0 to N-1, and 'M' connections, determine all critical connections. A connection is critical if its removal disrupt...
Implement a function to find critical connections in a network with system nodes and connections.
Create an adjacency list to represent the network connections.
Use Tarjan's algorithm to find critical connections in the network.
Output the count of critical connections and the pairs of nodes involved.
Handle multiple test cases efficiently.
Ensure that the removal of a critical connection disrupts network connectivity.
Round duration - 50 Minutes
Round difficulty - Easy
Time: 9 am to 10 am
Mode of Interview: Amazon Chime Video
LiveCode: To write code, it was not a compiler.
The interviewer was very nice.
You are provided with an integer array ARR
of size N
. You need to return an array PRODUCT
such that PRODUCT[i]
equals the product of all the elements of ARR
...
Return an array of products of all elements in an array except the current element.
Iterate through the array twice to calculate the product of all elements to the left and right of each element.
Use two arrays to store the products of elements to the left and right of each element.
Multiply the corresponding elements from the left and right product arrays to get the final product array.
Round duration - 50 Minutes
Round difficulty - Medium
Time: 3 pm to 4 pm
Mode of Interview: Amazon Chime Video
LiveCode: To write code, it was not a compiler
The interviewer was time adamant and not very supportive. A shadow interviewer was also there.
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherw...
Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.
Use a combination of a doubly linked list and a hashmap to efficiently implement the LRU cache.
Maintain a doubly linked list to keep track of the order of keys based on their recent usage.
Use a hashmap to store key-value pairs for quick access and update operations.
When a key is accessed or updated, mov...
Tip 1 : Practice different and quality questions from LeetCode, Interviewbit.
Tip 2 : Prepare subjects like OS, OOPS, DBMS.
Tip 1 : Keep it short and attractive.
Tip 2 : Be confident about everything you write in your resume.
What people are saying about Amazon
I appeared for an interview in Dec 2020.
Round duration - 60 minutes
Round difficulty - Medium
The interviewer was very friendly and introduced herself. She told me that she had two coding problems for this round.
Given a binary tree with N
nodes, your task is to output the Spiral Order traversal of the binary tree.
The input consists of a single line containing elem...
Implement a function to return the spiral order traversal of a binary tree.
Traverse the binary tree in a spiral order, alternating between left to right and right to left.
Use a queue to keep track of nodes at each level and a flag to switch direction.
Handle null nodes appropriately to maintain the spiral order traversal.
Example: Input: 1 2 3 -1 -1 4 5, Output: 1 3 2 4 5
You are provided with a 2D matrix containing only the integers 0 or 1. The matrix has dimensions N x M, and each row is sorted in non-decreasing order. Your...
Find the row with the maximum number of 1's in a sorted 2D matrix.
Iterate through each row of the matrix and count the number of 1's in each row.
Keep track of the row index with the maximum number of 1's encountered so far.
Return the index of the row with the maximum number of 1's.
If multiple rows have the same number of 1's, return the row with the smallest index.
Round duration - 70 minutes
Round difficulty - Medium
This round was held 30 minutes after the 2nd round. There were two interviewers and both introduced themselves. Both of them were friendly and made me comfortable for the round.
You have an array of N positive integers. Your goal is to sort this array in descending order based on the number of set bits in the binary representation of each integer.
In ...
Sort array of positive integers based on set bit count in descending order.
Count set bits for each integer using bitwise operations.
Implement a custom comparator function to sort the array based on set bit count.
Handle cases where integers have the same set bit count by retaining their original order.
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
Find minimum time to rot all fresh oranges adjacent to rotten oranges in a grid.
Use Breadth First Search (BFS) to simulate the rotting process
Keep track of the time taken to rot all fresh oranges
Return -1 if not all fresh oranges can be rotten
Tip 1 : Learn all basic DSA with their time and space complexities first. Then move on to company-specific problems.
Tip 2 : Have some experience in competitive programming, as it helps you to arrive at solutions quickly.
Tip 3 : Have decent projects and mention them on your resume... Prepare for every possible question that can be asked from them.
Tip 1 : Be honest on your resume. Don't mention things which you are not comfortable with.
Tip 2 : Have at least two decent projects on your resume... Mentioning tech used in them is a plus.
Amazon interview questions for designations
I appeared for an interview in Dec 2020.
Round duration - 75 Minutes
Round difficulty - Medium
You are provided with a 2-dimensional matrix having N
rows and M
columns, containing only 1s (land) and 0s (water). Your goal is to determine the number of islands in t...
Count the number of islands in a 2D matrix of 1s and 0s.
Use Depth First Search (DFS) or Breadth First Search (BFS) to traverse the matrix and identify connected groups of 1s.
Maintain a visited array to keep track of visited cells to avoid redundant traversal.
Increment the island count each time a new island is encountered.
Consider edge cases such as when the matrix is empty or all cells are water (0s).
You are given an N * N matrix of integers where each row and each column is sorted in increasing order. Your task is to find the positi...
Given a sorted N * N matrix, find the position of a target integer 'X'.
Iterate over each row and column to search for the target integer 'X'.
Utilize the sorted nature of the matrix to optimize the search process.
Return the position of 'X' if found, else return '-1 -1'.
Round duration - 60 Minutes
Round difficulty - Medium
You are provided with two sorted linked lists. Your task is to merge them into a single sorted linked list and return the head of the combined linked list.
...Merge two sorted linked lists into a single sorted linked list without using additional space.
Create a dummy node to start the merged list
Compare the nodes of both lists and link them accordingly
Move the pointer to the next node in the merged list
Handle cases where one list is empty or both lists are empty
Time complexity: O(n), Space complexity: O(1)
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Find pairs of elements in an array that sum up to a given value, sorted in a specific order.
Iterate through the array and for each element, check if the complement (S - current element) exists in a hash set.
If the complement exists, add the pair (current element, complement) to the result list.
Sort the result list based on the first element of each pair, and then based on the second element if the first elements are eq
Round duration - 60 Minutes
Round difficulty - Medium
it was pure DSA round, no HR round was there after this
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N ma...
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Recursively try moving in all directions (up, down, left, right) until reaching the destination.
Return the valid paths as a list of strings sorted in alphabetical order.
Tip 1 : Practice as many problems as you can
Tip 2 : Code the problems under by setting some limits
Tip 3 : Consistency is the key
Tip 1 : Mention at least 2 projects with short description
Tip 2 : Mention your achievements like coding contests and rankings etc
Get interview-ready with Top Amazon Interview Questions
I appeared for an interview in Dec 2020.
Round duration - 80 minutes
Round difficulty - Medium
This was Online interview
this is one and only interview which was based on totally DSA (Problem Solving Skills)
which was held on AMAZE CHIME
Timing : 12pm
Environment was very good
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 intege...
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
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.
Return t
Tip 1 : Code Properly, and do more and more practice on DSA
Tip 2 : Understand the concept behind the problem
Tip 3 : Be confident
Tip 1 : Write only topics on which you are confident
Tip 2 : Write important stuff only and try to make one page resume only.
I appeared for an interview in Dec 2020.
Round duration - 150 minutes
Round difficulty - Medium
Given a singly linked list of integers, determine if the linked list is a palindrome.
A linked list is considered a palindrome if it reads the same forwar...
Check if a given singly linked list of integers is a palindrome or not.
Traverse the linked list to find the middle element using slow and fast pointers.
Reverse the second half of the linked list.
Compare the first half with the reversed second half to determine if it's a palindrome.
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Find pairs of elements in an array that sum up to a given value, sorted in a specific order.
Iterate through the array and for each element, check if the complement (S - current element) exists in a hash set.
If the complement exists, add the pair (current element, complement) to the result list.
Sort the result list based on the first element of each pair, and then based on the second element if the first elements are eq
Round duration - 60 minutes
Round difficulty - Medium
You are provided with two integers, 'N' and 'D'. Your objective is to determine the square root of the number 'N' with a precision up to 'D' decimal pl...
Implement a function to find the square root of a number with a specified decimal precision.
Implement a function that takes two integers N and D as input and returns the square root of N with precision up to D decimal places.
Use mathematical algorithms like Newton's method to approximate the square root with the required precision.
Ensure that the difference between the computed result and the true square root is less t...
Tip 1 : Have more understanding and confidence over Data Structures and get good understanding of its concepts. At least practice 5-6 coding questions everyday on any coding platform. I had completed around 150+ questions on Leetcode and 250+ questions on Geek For Geeks. Practice regularly rather than completing all coding questions in one go.
Tip 2 : While attempting the questions analyze its time and space complexity. Always work on the strategies to further optimize your solution. Sometimes the interviewer asks only one question and keep on increasing its difficulty by asking for its optimization and will what kind of strategies you implement.
Tip 3 : Along with coding questions keep on studying concepts in details of Operating Systems, databases and object oriented programming. Refer to Geeks For Geeks articles for it. Also refer, Coding Ninja's Data Structures and algorithms course in C++ helped me a lot in improving my OOPS concepts specifically.
Tip 1 : Mention only those skills, projects or achievements which you have completed yourselves and thorough knowledge. Because there will be question around these and in case if you are not able to answer these basic questions it leaves a bad impact on interviewer.
Tip 2 : No need to add too many projects. Only one or two good projects with proper knowledge is fine. Also do the same for skills, do not add so many skills only add those one in which you can discuss and answer.
Tip 3 : Mention achievements which showcase your technical skills, communication skills, leadership quality or teamwork
I appeared for an interview in Nov 2020.
Round duration - 120 Minutes
Round difficulty - Medium
Around 4-5 pm
2 coding questions
7 debugging and output questions
20-30 aptitude questions
A section to test psychology based on various questions and situations.
Given a linked list where each node has two pointers: one pointing to the next node and another which can point randomly to any node in the list or ...
Cloning a linked list with random pointers by creating new nodes rather than copying references.
Create a deep copy of the linked list by iterating through the original list and creating new nodes with the same values.
Update the random pointers of the new nodes by mapping the original node's random pointer index to the corresponding new node.
Ensure the cloned linked list is an exact copy of the original by validating th...
You are provided with an array of integers ARR
of length N
. Your task is to determine the next smaller element for each array element.
The Next Smalle...
Given an array of integers, find the next smaller element for each element in the array.
Iterate through the array from right to left and use a stack to keep track of elements.
Pop elements from the stack until a smaller element is found or the stack is empty.
If no smaller element is found, output -1 for that element.
Round duration - 50 Minutes
Round difficulty - Medium
Timing - 4pm
Just asked one question based on DSA and asked to make the code modular and well indented.
Didn’t even ask for introduction.
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
Find minimum time to rot all fresh oranges in a grid if adjacent to rotten oranges.
Use Breadth First Search (BFS) to simulate the rotting process of oranges.
Keep track of the time taken to rot all fresh oranges.
If at the end there are still fresh oranges left, return -1 as it is impossible to rot all oranges.
Round duration - 60 Minutes
Round difficulty - Medium
Started at 4pm
Interviewer introduced himself and then asked me for a brief introduction.
Went ahead to ask 2 DSA based questions.
You are provided with 'K' sorted linked lists, each sorted in increasing order. Your task is to merge all these lists into one single sorted linked list and return the head of ...
Merge k sorted linked lists into one single sorted linked list.
Create a min-heap to store the heads of all k linked lists.
Pop the smallest element from the heap and add it to the result list.
If the popped element has a next element, push it back into the heap.
Repeat until all elements are merged into a single sorted list.
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N ma...
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Recursively try moving in all directions (up, down, left, right) until reaching the destination.
Add the current direction to the path and backtrack if the path leads to a dead end.
Return all valid paths found in alphabetical order as an ar
Tip 1 : Smart Preparation is very important instead of just preparing everything.
Tip 2 : Going through previous interview experiences helps a lot.
Tip 3 : Focussing on time and space complexities instead of just the logic.
Tip 4 : Be thorough with the projects mentioned in resume.
Tip 5 : Daily practice of as many questions as possible with at least a couple of questions with level:Hard
Tip 1 : Keep it technical and to the point with no catch phrases.
Tip 2 : Use of action verbs to highlight the work put in projects or any previous internships.
Tip 3 : Use of bullet points.
Tip 4 : Mention clickable links of your projects, github account and certificates whenever possible.
I appeared for an interview in Nov 2020.
Round duration - 90 Minutes
Round difficulty - Medium
It was in the evening, test consists of technical MCQ as well as Aptitude quesitons. There were debugging round of 7 questions and 2 coding questions (medium-hard leetcode level).
Given two binary trees, T and S, determine whether S is a subtree of T. The tree S should have the same structure and node values as a subtree of T.
Given two binary trees T and S, determine if S is a subtree of T with the same structure and node values.
Traverse both trees and check if S is a subtree of T at each node
Use recursion to compare subtrees
Handle edge cases like empty trees or null nodes
Given a linked list where each node has two pointers: one pointing to the next node and another which can point randomly to any node in the list or ...
Cloning a linked list with random pointers by creating new nodes rather than copying references.
Create a deep copy of the linked list by iterating through the original list and creating new nodes with the same values.
Update the random pointers of the new nodes by mapping the original node's random pointer index to the corresponding new node.
Ensure the cloned linked list is an exact copy of the original by validating th...
Round duration - 40 minutes
Round difficulty - Medium
It was in Morning. Interviewer was SDE-2 and was experienced.
You are given a task to help ninjas maximize their practice area in a dense forest represented by a sequence of trees (1s) and empty places (0s) in the binary representat...
Given an integer representing a binary sequence, find the maximum consecutive ones by flipping one bit.
Iterate through the binary representation of the integer to find the longest sequence of ones.
Track the positions of zeros to determine where to flip a bit for maximizing consecutive ones.
Update the count of consecutive ones after flipping a zero to one.
Return the maximum length of consecutive ones obtained by flippin
Ninja is adventurous and loves traveling while being mindful of his expenses. Given a set of 'N' stations connected by 'M' trains, each train starting from station 'A' and r...
Given a set of stations connected by trains, find the cheapest fare from a source to a destination with a maximum number of stops allowed.
Iterate through all possible routes with up to 'K' stops using a graph traversal algorithm like DFS or BFS.
Keep track of the cost for each route and return the minimum cost found.
If no route is found within the maximum stops allowed, return '-1'.
Round duration - 60 Minutes
Round difficulty - Easy
It was in evening. Interviewer was really energetic and funny.
You are given a non-empty grid MAT
with 'N' rows and 'M' columns, where each element is either 0 or 1. All rows are sorted in ascending order.
Your task is to ...
Find the row with the maximum number of 1's in a grid of 0's and 1's.
Iterate through each row of the grid and count the number of 1's in each row.
Keep track of the row index with the maximum number of 1's seen so far.
Return the index of the row with the maximum number of 1's.
Calculate the probability that a knight remains on an N x N chessboard after making K moves. Initially, the knight is placed at a given position on the board. It can move ...
Calculate the probability that a knight remains on an N x N chessboard after making K moves.
Use dynamic programming to calculate the probability of the knight staying on the board after each move.
Consider all possible moves the knight can make from its current position.
Keep track of the probabilities at each position on the board after each move.
Normalize the probabilities at the end to get the final result accurate to
Tip 1 : Try to cover all most common questions of all topics(atleast 300+ questions)
Tip 2 : Try to see as many interview experience as possible of the company you are applying.
Tip 3 : Try to give atleast 2-3 mock interview before main interview
Tip 1 : Try to put competitive programming ranks if possible or Coding Ninjas Certificate, or any proof that you do programming regularly.
Tip 2 : Try to add atleast 2 projects, and study about those projects well/
I appeared for an interview in Nov 2020.
Round duration - 90 minutes
Round difficulty - Medium
There were 30 MCQ and 7 Debugging question and two coding question
Then technical interview 1
Then last technical plus hr Interview
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 ...
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 each tes...
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 thes...
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.
Round duration - 60 minutes
Round difficulty - Medium
Two questions were given to me and requested to solve in the desired time.
Given a Singly Linked List of integers that are sorted based on their absolute values, the task is to sort the linked list based on the actual values.
The absolute...
Sort a Singly Linked List based on actual values instead of absolute values.
Traverse the linked list and store the nodes in an array.
Sort the array based on the actual values of the nodes.
Reconstruct the linked list using the sorted array.
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 gr...
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 40 -1...
Round duration - 60 minutes
Round difficulty - Medium
Two questions were asked but I don't remember the second one.
You are given an array ARR
of size N
and an integer K
. Your task is to split ARR
into K
sub-arrays such that the maximum sum obtained from these K
subarrays is minimized.
Split an array into K subarrays to minimize the maximum sum obtained from the subarrays.
Sort the array in descending order to get the maximum sum possible.
Use binary search to find the minimum possible value of the maximum sum.
Consider the constraints to optimize the solution.
Example: For N=4, K=3, ARR=[1, 2, 3, 4], the minimum possible value of the maximum sum is 4.
Tip 1 : Strengthen your base , by doing easy level questions , then try medium level and then hard
Tip 2 : You will face many problems while preparing but stay focused towards your goal
Tip 1 : A few good projects will do the work
Tip 2 : Provide links of coding platform you are doing well
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 less than 2 weeks to complete.
based on 41 interviews
3 Interview rounds
based on 91 reviews
Rating in categories
Customer Service Associate
4.2k
salaries
| ₹0.6 L/yr - ₹6.8 L/yr |
Transaction Risk Investigator
3.1k
salaries
| ₹2 L/yr - ₹6.1 L/yr |
Associate
2.9k
salaries
| ₹0.8 L/yr - ₹7 L/yr |
Senior Associate
2.5k
salaries
| ₹2 L/yr - ₹10.5 L/yr |
Program Manager
2.2k
salaries
| ₹9 L/yr - ₹37 L/yr |
Flipkart
TCS
Netflix