Filter interviews by
I applied via Job Fair and was interviewed in Jul 2024. There were 2 interview rounds.
More focus on dp,graphs.
I appeared for an interview in Jan 2021.
Round duration - 65 minutes
Round difficulty - Hard
Timing (6pm - 8pm)
Environment was user friendly
As usual the online round had three coding questions and 20 MCQs. This was a pretty easy round and it’s duration was 65 minutes. The round consisted of questions from various domains like Algorithm, Data Structure, Operating System and Aptitude.
You are given two arrays ARR1
and ARR2
, containing N
and M
elements respectively. There are two types of 'good triplets' that need to be identified in these arrays.
Type ...
Calculate the total number of 'good triplets' in two arrays based on given conditions.
Iterate through all possible triplets in both arrays and check if they satisfy the conditions
Use nested loops to iterate through all combinations of indices in both arrays
Check the conditions for Type 1 and Type 2 'good triplets' separately
Increment a counter for each valid 'good triplet' found
Return the total count of 'good triplets'
You are given a string str
consisting of N
lowercase alphabets. Your task is to determine if it is possible to divide the string into three non-empty substrings such tha...
Given a string, determine if it can be split into three non-empty substrings where one is a substring of the other two.
Check if any substring of the string is a substring of the other two substrings.
Iterate through all possible divisions of the string into three non-empty substrings.
Use two pointers to find all possible substrings efficiently.
Round duration - 40 minutes
Round difficulty - Medium
Given two arbitrary binary trees, your task is to determine whether these two trees are mirrors of each other.
Two trees are considered mirror of each other if...
Check if two binary trees are mirrors of each other based on specific criteria.
Compare the roots of both trees.
Check if the left subtree of the first tree is the mirror of the right subtree of the second tree.
Verify if the right subtree of the first tree is the mirror of the left subtree of the second tree.
Given a 'Snake and Ladder' board with N rows and N columns, where positions are numbered from 1 to (N*N) starting from the bottom left, alternating direction each row, f...
Find the minimum number of dice throws required to reach the last cell on a 'Snake and Ladder' board.
Use Breadth First Search (BFS) to find the shortest path from the starting cell to the last cell.
Maintain a queue to explore all possible moves from each cell.
Consider the effect of snakes and ladders on the movement of the player.
Handle the case where the last cell is unreachable by returning -1.
Optimize the solution b...
Tip 1 : Must do questions from GFG.
Tip 2 : SDE sheet of striver can be helpful.
Tip 1 : Do at least 3 major web dev project
Tip 2 : should be precise and descriptive
Tip 3 : also add your past experiences in the resume
I appeared for an interview before Sep 2020.
Round duration - 60 minutes
Round difficulty - Medium
6 students from the campus were selected for this round. The interviews were conducted simultaneously for all on BlueJeans along with a code sharing website. After the initial set up and introduction, a set of 2 questions from DSA were asked from all candidates. The results were announced the same day.
Given an undirected and disconnected graph G(V, E)
, where V
is the number of vertices and E
is the number of edges, the connections between vertices are provided in the 'GR...
DFS traversal to find connected components in an undirected and disconnected graph.
Use Depth First Search (DFS) to traverse the graph and find connected components
Maintain a visited array to keep track of visited vertices
For each unvisited vertex, perform DFS to explore the connected component it belongs to
Print the vertices of each connected component in ascending order
Given two sorted integer arrays A
and B
with sizes N
and M
respectively, find the median of the combined array that results from merging arrays A
and B
. If th...
Find the median of two sorted arrays after merging them.
Merge the two sorted arrays into one sorted array.
Calculate the median based on the length of the combined array.
Handle cases where the total number of elements is even or odd.
Tip 1 : Practice an ample amount of questions from online sites like GeeksforGeeks and HackkerRank on all major topics. Once you are done with topicwise preparation, go on and try out some timed tests too.
Tip 2 : Don't forget to revise OOPS, OS, DBMS too.
Tip 3 : Try out mock interviews with friends, that's the best thing you can do for yourself other than practising questions!!
Tip 4 : During the interview, one thing that is asked for sure is the time complexity of your solution, so always know the complexity of your algorithms.
Tip 1 : Have your projects clearly mentioned and well explained
Tip 2 : Make sure that there are no formatting errors
Tip 3 : Mention your LinkedIn profile ;)
Top trending discussions
I appeared for an interview before Sep 2020.
Round duration - 150 Minutes
Round difficulty - Easy
Debugging: This section had 7 debugging problems, which consist of code snippets that have some logical error that needs to be rectified.
Reasoning Ability: This section consists of some verbal reasoning questions and some aptitude questions.
Coding: This section consists of 2 coding problems.
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'.
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 ...
Deep copy a linked list with random pointers and return its head. Validate if the cloned linked list is an exact copy of the original.
Create a new node for each node in the original linked list and maintain a mapping between original and cloned nodes.
Update the next and random pointers of the cloned nodes based on the mapping.
Time complexity: O(N) where N is the number of nodes in the linked list.
Space complexity: O(N)...
Round duration - 60 minutes
Round difficulty - Medium
Around 30 candidates were shortlisted from my campus and over 150+ candidates were shortlisted from the university, and I was one of them. Then my first round of interviews was scheduled. I was pretty nervous before the interview.
Given a 2D array with dimensions N*M
, your task is to read the array elements in a row-wise manner and return a linear array that stores the elements in a 'wave' pattern. S...
Given a 2D array, return a linear array storing elements in a 'wave' pattern.
Read the array elements row-wise and store in wave pattern
Alternate direction for storing elements from each row
Handle edge cases like single row or single column arrays
Use nested loops to iterate through the 2D array
Given an array/list of integers PRE
representing the preorder traversal of a strict binary tree, and an array/list TYPENL
with values 'L' or 'N', where 'L' denotes a...
Given preorder traversal and node type information, construct a strict binary tree and return the root node.
Create a binary tree using preorder traversal and node type information
Use recursion to construct the tree
Handle leaf and non-leaf nodes separately
Ensure each node has 0 or 2 children
Round duration - 60 minutes
Round difficulty - Medium
My interviewer introduced himself in the beginning and asked for my introduction.
You are provided with a sorted dictionary (by lexical order) in an alien language. Your task is to determine the character order of the alien language from this dictiona...
Given a sorted alien dictionary in an alien language, determine the character order of the language.
Iterate through the dictionary to build a graph of character dependencies.
Perform a topological sort on the graph to determine the character order.
Return the character array representing the order of characters in the alien language.
Tip 1 : Practice ds and algo
Tip 2 : Be confident
Tip 3 : Speak out loud and be clear
Tip 1 : Mention only what you know
Tip 2 : Having Cp ranks is a plus
I appeared for an interview before Sep 2020.
Round duration - 120 minutes
Round difficulty - Medium
10 min for debugging
40 min for problems(coding)
40 min for pyschometric
30 min for aptitude
You are located at point ‘A’, the top-left corner of an M x N matrix, and your target is point ‘B’, the bottom-right corner of the same matrix. Your task is to calcula...
The task is to calculate the total number of unique paths from the top-left to 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 the first row and column.
For each cell ...
You are given two strings 'A' and 'B' composed of words separated by spaces. Your task is to determine the most frequent and lexicographically smallest word in string ...
Find the most frequent and lexicographically smallest word in string 'A' that is not present in string 'B'.
Split strings 'A' and 'B' into words
Count frequency of each word in 'A'
Check if word is not in 'B' and is the most frequent and lexicographically smallest
Return the word or -1 if no such word exists
Round duration - 90 Minutes
Round difficulty - Easy
timing was 4 pm . we connected on amazon chime. Initially he asked me a few things from resume then moved on to problem solving.
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 all eight possible directions for connectivity while traversing the matrix.
Handle edge ca...
You are given an array/list HEIGHTS
of length N
, where each element represents the height of a histogram bar. The width of each bar is considered to be 1.
Find the area of the largest rectangle that can be formed within the bounds of a given histogram.
Iterate through the histogram bars and maintain a stack to keep track of increasing heights.
Calculate the area of the rectangle formed by each bar as the smallest height in the stack times the width.
Update the maximum area found so far and return it as the result.
Tip 1 : be confident since interviewer is looking at how confident you are with your skills
Tip 2 : dont learn the algorithms but try to understand them
Tip 3 : focus on trees and graphs since amazon asks more of that
Tip 1 : KEEP RESUME SHORT(1 PAGE)
Tip 2 : DONT BLUFF IN RESUME SINCE MY INTERVIEWER ASKED ME LOOKING FROM IT
I applied via Company Website and was interviewed in Aug 2021. There were 2 interview rounds.
E-commerce
I appeared for an interview before Sep 2020.
Round duration - 60 minutes
Round difficulty - Easy
There was 2 coding questions
Based on ds and algorithms
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, 4567,
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 Tr...
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 righ
Round duration - 60 minutes
Round difficulty - Easy
There was 2 coding questions based on ds and algorithms
You are provided with an array of distinct elements, and your task is to rearrange the array elements in a zig-zag manner. Specifically, for every odd index i
, the element ARR[...
Rearrange array elements in a zig-zag manner where every odd index element is greater than its neighbors.
Iterate through the array and swap elements to satisfy the zig-zag condition.
Ensure that for every odd index i, ARR[i] > ARR[i-1] and ARR[i] > ARR[i+1].
Multiple correct answers may exist for a given array.
You are provided with a linked list of 'N' nodes. Each node contains two pointers: NEXT
, pointing to the next node in the list, and CHILD
, pointing to a linked list. Each child linke...
Flatten a linked list of sorted child linked lists into a single sorted linked list.
Traverse the linked list and maintain a priority queue to keep track of the next smallest element.
Merge the child linked lists into the priority queue while traversing the main linked list.
Pop elements from the priority queue to create the final flattened linked list.
Round duration - 45 Minutes
Round difficulty - Medium
My interview started at 9:30 and it took around 45 minutes to complete my interview.This was held on Amazon Chime and the interview lasted for 1 hour. Firstly the interviewer asked to introduce about myself, later asked regarding the projects I have mentioned in my resume. Then started displaying the coding question. The first question is number of islands in a matrix.
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 like when the matrix is empty or all cells are water (0s).
Tip 1 : Be enough confident, don't be nervous. Maintain atleast 2 projects in your resume.
Tip 2 : You should be able to answer each and every thing present in your resume. Don't lie in your resume.
Tip 3 : Prepare Data Structures and Algorithms well. They mostly check our Problem Solving ability to find the solutions for the real world problems
Tip 1 : Mention your skills in which you are perfect
Tip 2 : Mention atleast two projects
I appeared for an interview before Sep 2020.
Round duration - 2 hour 30 mins
Round difficulty - Easy
Debugging: This section had 7 debugging problems, which consist of code snippets that have some logical error that needs to be rectified.
Reasoning Ability: This section consists of some verbal reasoning questions and some aptitude questions.
Coding: This section consists of 2 coding problems.
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 within the matrix.
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
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 - 60 minutes
Round difficulty - Medium
Around 30 candidates were shortlisted from my campus and over 150+ candidates were shortlisted from the university, and I was one of them. Then my first round of interviews was scheduled. I was pretty nervous before the interview.
You are provided with a 2D array having dimensions 'N*M'. Your task is to traverse the elements row-wise and return a single-dimensional array which stores these ...
Traverse a 2D array row-wise and return elements in a wave pattern.
Traverse the 2D array row-wise and store elements alternately in a wave pattern.
For each row, store elements from left to right for odd rows and from right to left for even rows.
Return the final 1D array representing the wave pattern of elements.
Given two lists, one representing the preorder traversal ('PRE') of a strict binary tree and the other ('TYPENL') indicating if each node is a leaf ('L') or non-leaf ('N')....
Construct a strict binary tree from preorder traversal and leaf/non-leaf indicators.
Create a binary tree node class with value and left/right pointers.
Use a stack to keep track of parent nodes while constructing the tree.
Check if the current node is a leaf or non-leaf based on 'TYPENL' list.
Round duration - 60 minutes
Round difficulty - Medium
My interviewer introduced himself in the beginning and asked for my introduction.
You've been provided with a sorted dictionary in an alien language. Your task is to determine the character order of this alien language from this dictionary. The dictio...
Given a sorted dictionary in an alien language, determine the character order of the language.
Iterate through the dictionary to find the order of characters based on their appearance in words.
Create a graph of characters and their relationships based on adjacent words in the dictionary.
Perform a topological sort on the graph to determine the character order.
Return the list of characters in the correct order as the outp
Tip 1 : Practice ds and algo
Tip 2 : Be confident
Tip 3 : Speak out loud and Be clear
Tip 1 : Mention only what you know
Tip 2 : Having Cp ranks is a plus
I appeared for an interview before Sep 2020.
Round duration - 90 minutes
Round difficulty - Medium
25 mcqs and 2 coding questions
(It was a part of Amazewow process via Amazewit https://www.amazewit.in/)
Timing- any time between 22-24 may 2020
Webcam was on.
Given an array/list of integers ARR
consisting of N
integers, your task is to determine the length of the longest decreasing subsequence.
A ...
Find the length of the longest decreasing subsequence in an array of integers.
Use dynamic programming to keep track of the longest decreasing subsequence ending at each index.
Initialize an array to store the length of the longest decreasing subsequence ending at each index.
Iterate through the array and update the length of the longest decreasing subsequence for each element.
Return the maximum value in the array as the
Given an array arr
of length N, your task is to compute the Next Greater Element (NGE) for each element in the array. The NGE for an element X
is the first greater e...
The task is to find the Next Greater Element (NGE) for each element in an array.
Iterate through the array from right to left and use a stack to keep track of elements.
For each element, pop elements from the stack until finding a greater element.
Store the next greater element in a result array, if no greater element is found, store -1.
Time complexity can be optimized to O(N) using a stack.
Example: For input array [1, 3,
Round duration - 60 minutes
Round difficulty - Medium
It held at morning 10 AM.
The interviewer was very friendly.
I was asked to solve 2 coding questions and was continuously provided with hints by the interviewer.
Question was on Array and Trees.
Given a Binary Search Tree (BST) of integers, the task is to convert it into a greater sum tree. In this transformation, each node's value is replaced by the sum of value...
Convert a Binary Search Tree into a Greater Sum Tree by replacing each node's value with the sum of values of all nodes greater than the current node.
Traverse the BST in reverse inorder (right, root, left) to visit nodes in descending order.
Keep track of the sum of visited nodes and update each node's value with this sum.
Recursively apply the above steps to all nodes in the BST.
Example: For the given BST, the transform...
Round duration - 45 minutes
Round difficulty - Hard
Morning 8 AM.
The interviewer was very friendly provided with various hints.
It was covering complex coding questions on Tree Data Structures.
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.
Perform a depth-first search (DFS) to calculate the time taken to burn the entire tree.
Track the time taken for each node to catch fire and propagate the fire to its adjacent nodes.
Return the maximum time taken among all nodes as the total time to burn the entire tree.
Given a binary tree and the values of two nodes, your task is to find the distance between these nodes within the Binary Tree.
Distance is defined as the minim...
Find the distance between two nodes in a binary tree.
Traverse the binary tree to find the paths from the root to each node.
Find the lowest common ancestor of the two nodes.
Calculate the distance by adding the distances from the nodes to the common ancestor.
Tip 1: Code More
Tip 2: Study Data Structures
Tip 3: Be Confident
Tip 1: Mention only what you are confident about
Tip 2: Mention tools & technologies used in the project as well
I appeared for an interview before Sep 2020.
Round duration - 90 minutes
Round difficulty - Medium
It contains 20 MCQs, based on the output of the given code and next followed by 2 programming questions. To get qualified for the next round you need to solve the 2 programming questions completely. The next rounds will be interviews. They had given 3 days time to attempt the first round.
Given an N*M matrix filled with integer numbers, determine the maximum sum that can be obtained from a path starting from any cell in the first row to any cell in the last row...
Find the maximum sum path in a matrix from top row to bottom row by moving down or diagonally.
Use dynamic programming to keep track of maximum sum at each cell.
At each cell, the maximum sum is the current cell value plus the maximum of the three possible previous cells.
Iterate through the matrix row by row and update the maximum sum at each cell.
Return the maximum sum found in the last row as the result.
You are given D
dice, each having F
faces numbered from 1 to F
. The task is to determine the number of possible ways to roll all the dice such that the sum of the face-up num...
The task is to determine the number of possible ways to roll all the dice such that the sum of the face-up numbers equals the given 'target' sum.
Use dynamic programming to solve the problem efficiently.
Create a 2D array to store the number of ways to reach each sum with each dice.
Iterate through the dice and sum values to fill up the array.
Return the result modulo 10^9 + 7.
Optimize the solution to use no more than O(S)
Round duration - 50 minutes
Round difficulty - Hard
Determine if a permutation of a given string S
can form a palindrome.
string S = "aab"
"True"
The permutation "aba" o...
Check if a permutation of a string can form a palindrome.
Create a frequency map of characters in the string.
Count the number of characters with odd frequencies.
If there is at most one character with an odd frequency, the string can form a palindrome.
Given two strings STR1
and STR2
, determine the length of their longest common subsequence.
A subsequence is a sequence that can be derived from another sequen...
The problem involves finding the length of the longest common subsequence between two given strings.
Implement a function to find the longest common subsequence length between two strings.
Use dynamic programming to solve the problem efficiently.
Iterate through the strings and build a matrix to store the lengths of common subsequences.
Return the value in the bottom-right cell of the matrix as the result.
Tip 1 : Be thorough with Algorithm and Data Structures concepts.
Tip 2 : Try solving programming questions, mainly focus on the constraints before start writing the code.
Tip 3 : Try to find out an optimal solution.
Tip 1 : Include the projects you have done.
Tip 2 : Only include the programming languages, technologies you are thorough with.
based on 1 interview
Interview experience
based on 2 reviews
Rating in categories
Software Engineer
98
salaries
| ₹19.5 L/yr - ₹72 L/yr |
Senior Software Engineer
74
salaries
| ₹47.8 L/yr - ₹80 L/yr |
Trust and Safety Specialist
74
salaries
| ₹5.5 L/yr - ₹9 L/yr |
Software Developer
68
salaries
| ₹17.5 L/yr - ₹40 L/yr |
Content Reviewer
37
salaries
| ₹3.6 L/yr - ₹9.9 L/yr |
Amazon
Flipkart
Udaan
BigBasket