i
Amazon
Proud winner of ABECA 2025 - AmbitionBox Employee Choice Awards
Filter interviews by
Ninja, who loves playing with numbers, sets out to arrange numbers within 'N' rows. The unique arrangement follows these rules: the first row contains 1 number, the second ...
Generate a pattern of numbers in rows following a specific sequence based on powers of 2.
Start with 1 number in the first row, 2 numbers in the second row, 4 numbers in the third row, and so on based on powers of 2.
Fill the pattern with numbers in increasing sequence from 1 to 9, recycling back to 1 after reaching 9.
Output the pattern for a given number 'N' of rows.
Example: For N = 4, the pattern would be 1, 23, 4...
You are given a binary tree with 'N' integer nodes. Your task is to determine whether this binary tree is a Binary Search Tree (BST).
A Binary Search Tre...
Validate if a given binary tree is a Binary Search Tree (BST) or not.
Check if the left subtree of a node contains only nodes with data less than the node's data.
Check if the right subtree of a node contains only nodes with data greater than the node's data.
Recursively check if both the left and right subtrees are also binary search trees.
Example: For a node with data 4, left subtree nodes (2, 1, 3) are smaller and...
You are provided with a directed graph composed of 'N' nodes. You have a matrix called 'EDGES' with dimensions M x 2, which specifies the 'M' edges in the graph. Each edge ...
Detect cycle in a directed graph using depth-first search (DFS) algorithm.
Use DFS to traverse the graph and detect back edges indicating a cycle.
Maintain a visited array to keep track of visited nodes during traversal.
If a node is visited again during traversal and it is not the parent node, then a cycle exists.
Return true if a cycle is detected, false otherwise.
Find the next smallest palindrome strictly greater than a given number 'N' represented as a string 'S'.
You are given a number in string format, an...
Find the next smallest palindrome greater than a given number represented as a string.
Convert the string to an integer, find the next greater palindrome, and convert it back to a string.
Handle cases where the number is a palindrome or has all digits as '9'.
Consider both odd and even length numbers when finding the next palindrome.
What people are saying about Amazon
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 c...
Return the boundary nodes of a binary tree in 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
Handle cases where duplicates occur in the boundary nodes
Implement the function without printing as printing is already managed
A thief is planning to steal from several houses along a street. Each house has a certain amount of money stashed. However, the thief cannot loot two adjacent houses. Determin...
Determine the maximum amount of money a thief can steal from houses without looting two consecutive houses.
Use dynamic programming to keep track of the maximum amount of money that can be stolen up to each house.
At each house, the thief can either choose to steal from the current house and the house two steps back, or skip the current house and steal from the previous house.
Return the maximum amount of money that ...
Given a string S
which represents a number, determine the smallest number strictly greater than the original number composed of the same digits. Each digit's frequency...
Given a number represented as a string, find the smallest number greater than the original with the same set of digits.
Iterate from right to left to find the first digit that can be swapped with a larger digit to make the number greater.
Swap this digit with the smallest digit to its right that is larger than it.
Sort the digits to the right of the swapped digit in ascending order to get the smallest number greater ...
Given a string S
of length N
, an array A
of length M
consisting of lowercase letters, and a positive integer K
, determine the minimum number of swaps re...
The minimum number of swaps required to make a string K-periodic by replacing characters with elements from an array.
Iterate through the string and check if each character matches the character K positions ahead.
Count the number of characters that need to be swapped to make the string K-periodic.
Use the array elements to swap characters in the string.
Return the total number of swaps needed for each test case.
Your task is to determine the minimum number of platforms required at a railway station so that no train has to wait.
Given two arrays:
AT
- representi...Determine the minimum number of platforms needed at a railway station so that no train has to wait.
Sort the arrival and departure times arrays in ascending order.
Initialize two pointers, one for arrival times and one for departure times.
Increment the platform count when a train arrives and decrement when it departs.
Keep track of the maximum platform count needed.
Return the maximum platform count as the minimum num...
Mutex is used for exclusive access to a resource by only one thread at a time, while Semaphores can allow multiple threads to access a resource simultaneously.
Mutex is binary and allows only one thread to access a resource at a time, while Semaphores can have a count greater than one.
Mutex is used for protecting critical sections of code, while Semaphores can be used for controlling access to a pool of resources.
E...
2-3 coding questions with some mcq
I applied via Internshala and was interviewed in Nov 2024. There were 3 interview rounds.
Genral Aptitude questions
Normal Coding Test DSA, Data Strcuures
I appeared for an interview in Mar 2025, where I was asked the following questions.
I appeared for an interview in Nov 2024, where I was asked the following questions.
HTML, which stands for HyperText Markup Language, is the foundation of every webpage on the web. It provides the structure and content for web pages by using a series of elements, tags, and attributes. HTML defines how text, images, and other multimedia content are displayed in a web browser.
JavaScript is a versatile programming language primarily used for adding interactivity and dynamic features to websites and web applications. It works in conjunction with HTML and CSS to make web pages more engaging and responsive to user input. JavaScript is a client-side scripting language, meaning it runs in the user's web browser.
MySQL is an open-source relational database management system used for storing and managing data.
MySQL uses Structured Query Language (SQL) for database operations.
It supports various data types, including INT, VARCHAR, and DATE.
MySQL is widely used in web applications, such as WordPress and Joomla.
It allows for data manipulation through commands like SELECT, INSERT, UPDATE, and DELETE.
MySQL can handle large databases ...
URL stands for Uniform Resource Locator, a reference to a web resource that specifies its location on a computer network.
A URL is used to access web pages, such as 'https://www.example.com'.
It consists of several components: protocol (http), domain (example.com), and path (/page).
URLs can also include query parameters, like 'https://www.example.com/search?q=keyword'.
They are essential for web navigation and linking bet...
BFS (Breadth First Search) and DFS (Depth First Search) are algorithms used for traversing or searching tree or graph data structures.
BFS explores all the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level.
DFS explores as far as possible along each branch before backtracking.
BFS uses a queue data structure while DFS uses a stack or recursion.
Example: BFS can be used to find the ...
Dynamic programming is used to solve problems that can be broken down into overlapping subproblems and have optimal substructure.
DP is used for problems with optimal substructure, where the solution can be constructed from optimal solutions of its subproblems.
DP is used for problems with overlapping subproblems, where the same subproblems are solved multiple times.
Examples include Fibonacci sequence, shortest path prob...
I applied via Company Website and was interviewed in Sep 2023. There were 2 interview rounds.
The depth of a binary tree is the number of edges on the longest path from the root node to a leaf node.
Depth of a binary tree can be calculated recursively by finding the maximum depth of its left and right subtrees and adding 1.
For example, a binary tree with only a root node has a depth of 0, while a binary tree with one root node and two leaf nodes has a depth of 1.
The depth of a binary tree can also be visualized ...
Reversing a linked list involves changing the direction of its nodes to point to the previous node instead of the next.
Iterative approach: Use three pointers (prev, current, next) to reverse the links.
Example: For list 1 -> 2 -> 3, after reversal it becomes 3 -> 2 -> 1.
Recursive approach: Reverse the rest of the list and adjust the pointers accordingly.
Example: In a recursive call, reverse 2 -> 3 first, ...
I appeared for an interview in May 2022.
Round duration - 90 Minutes
Round difficulty - Medium
Timing-90 Duration Of Assessment
you need to give the test within 5 days of getting the test mail.
Test is conducted virtually through Hackerrank platform and after that it redirects to Amazon page where we need to answer questions related to Amazon’s Leadership Principles and workstyles.
Given the dimensions of an M x N matrix, determine the total number of unique paths from the top-left corner to the bottom-right corner of the matrix.
Allowed moves are onl...
The problem involves finding the total number of unique paths from the top-left corner to the bottom-right corner of an M x N matrix by moving only right or down.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of unique paths for each cell in the matrix.
Initialize the first row and first column with 1 as there is only one way to reach each cell in those rows and columns.
F...
Given a binary tree, your task is to print the left view of the tree. The left view of a binary tree contains the nodes visible when the tree is viewed from the left side.
Print the left view of a binary tree, containing nodes visible from the left side.
Traverse the tree level by level and print the first node of each level.
Use a queue to keep track of nodes at each level.
Handle null nodes represented by -1 in the input.
Round duration - 60 Minutes
Round difficulty - Hard
We need to solve 1 or 2(based on interviewer) coding question within 1 hour in which we need to explain our approach before writing the code and we need to give optimal solution of the approach.
Bob and his wife are in the famous 'Arcade' mall in the city of Berland. This mall has a unique way of moving between shops using trampolines. Each shop is laid out in a st...
Find the minimum number of jumps Bob needs to make from shop 0 to reach the final shop, or return -1 if impossible.
Use Breadth First Search (BFS) to find the minimum number of jumps needed.
Keep track of the maximum reachable index at each step.
If the maximum reachable index is less than the current index, return -1 as it's impossible to reach the last shop.
Tip 1 : Do lots of competitive programming
Tip 2 : Create a nice portfolio on any coding platform like LeetCode or CodeChef because it will attract recruiter's.
Tip 3 : Pick only one Programming language for coding because it will help you to learn syntax by heart.
Tip 1 : Try to make resume of single column because it easily bypass the parser/scanner
Tip 2 : Do not put false things and over skills in your resume.
Tip 3 : Either you are fresher or experienced still don't make resume more than 2 pages.
I applied via LinkedIn and was interviewed in Jun 2022. There were 3 interview rounds.
Questions like leetcode, a lot of double linked lists
I appeared for an interview in Jul 2021.
Round duration - 60 minutes
Round difficulty - Easy
There was 2 coding questions
Based on ds and algorithms
Given an integer array ARR
of size N
, your task is to find the total number of inversions that exist in the array.
An inversion is defined for a pair of integers in the...
Count the total number of inversions in an integer array.
Iterate through the array and for each pair of elements, check if the conditions for inversion are met.
Use a nested loop to compare each element with all elements to its right.
Keep a count of the inversions found and return the total count at the end.
Given an unsorted array arr
of distinct integers and an integer k
, your task is to find the k-th
smallest element in the array.
The first line of input c...
Find the k-th smallest element in an unsorted array of distinct integers.
Sort the array and return the k-th element.
Use a min-heap to find the k-th smallest element efficiently.
Implement quickselect algorithm to find the k-th smallest element in linear time.
Round duration - 45 minutes
Round difficulty - Easy
It was easy and the interviewer is very friendly
Your task is to determine if two given strings are anagrams of each other. Two strings are considered anagrams if you can rearrange the letters of one string to form the...
Check if two strings are anagrams of each other by comparing their sorted characters.
Sort the characters of both strings and compare them.
Use a dictionary to count the frequency of characters in each string and compare the dictionaries.
Ensure both strings have the same length before proceeding with the comparison.
Given 'N' students standing in a row with specific heights, your task is to find the length of the longest strictly increasing subsequence of their heights...
Find the length of the longest strictly increasing subsequence of heights of students in a row.
Iterate through the heights array and for each element, find the length of the longest increasing subsequence ending at that element.
Use dynamic programming to keep track of the longest increasing subsequence length for each element.
Return the maximum length found in the dynamic programming array as the result.
You have a sequence of consecutive nonnegative integers. By appending all integers end-to-end, you formed a string S
without any separators. During this pro...
Given a string of consecutive nonnegative integers with one missing number, find the missing integer.
Iterate through the string and check for missing numbers by comparing adjacent integers
Calculate the sum of the original sequence and the sum of the integers in the string to find the missing number
Handle cases where there are multiple missing numbers or the string is invalid
Round duration - 20 minutes
Round difficulty - Medium
Asked general questions based on family
Spoke about ctc and relocation
Tip 1 : Even if you are stuck in the problem, just give a try. The interviewer will help you definitely for sure.
Tip 2 : Prepare Data Structures and Algorithms well. They mostly check our Problem Solving ability to find the solutions for the real world problems.
Tip 3 : Be enough confident, don't be nervous. Maintain atleast 2 projects in your resume.
Tip 1 : Mention atleast 2 projects.
Tip 2 : Mention your skills in which you are perfect.
Some of the top questions asked at the Amazon Software Developer interview for freshers -
The duration of Amazon Software Developer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 7 interview experiences
Difficulty level
Duration
based on 272 reviews
Rating in categories
Bangalore / Bengaluru
5-10 Yrs
Not Disclosed
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