i
Dunzo
Filter interviews by
Given an array/list ASTEROIDS
representing asteroids aligned in a row, each element's absolute value identifies the asteroid's size, while its sign indicates the dire...
Determine the state of asteroids after collisions occur.
Iterate through the array of asteroids and simulate collisions between adjacent asteroids.
Use a stack to keep track of remaining asteroids after collisions.
Handle cases where asteroids moving in opposite directions collide and destroy each other.
Handle cases where asteroids moving in the same direction do not collide.
Given a non-empty string 'S' containing no spaces and a dictionary of non-empty strings, generate and return all possible sentences by adding spaces in the string 'S', such ...
Given a string and a dictionary, generate all possible sentences by adding spaces between words from the dictionary.
Use backtracking to generate all possible sentences by recursively adding words from the dictionary to the current sentence.
Check if the current substring of the input string exists in the dictionary, if so, add it to the current sentence and continue recursively.
When the entire input string is proce...
Given a string 'STR' consisting solely of the characters “{”, “}”, “(”, “)”, “[” and “]”, determine if the parentheses are balanced.
The first line contains an ...
The task is to determine if a given string consisting of parentheses is balanced or not.
Use a stack data structure to keep track of opening parentheses
Iterate through the string and push opening parentheses onto the stack and pop when encountering a closing parenthesis
If at the end the stack is empty, the string is balanced, otherwise it is not
Design and implement a Trie (Prefix Tree) which should support the following two operations:
1. Insert a word into the Trie. The operation is marked as 'insert(word)'.
2. ...
Implement a Trie data structure supporting insert and search operations efficiently.
Implement a Trie class with insert and search methods.
Use a nested class Node to represent each node in the Trie.
For insert operation, iterate through each character in the word and create nodes as needed.
For search operation, traverse the Trie based on the characters in the word to check for existence.
Return 'TRUE' if the word is ...
Implementing undo and redo operations for MS Word
Maintain a stack for undo operations and another stack for redo operations
Whenever a change is made, push the previous state onto the undo stack
When undo is triggered, pop the state from undo stack and push it onto redo stack
When redo is triggered, pop the state from redo stack and push it onto undo stack
Ensure to update the document state accordingly after each und...
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, keeping track of the leftmost node at each level
Use a queue for level order traversal and a map to store the leftmost nodes
Print the values of leftmost nodes stored in the map as the left view of the tree
Given a binary tree, convert this binary tree into its mirror tree. A binary tree is a tree in which each parent node has at most two children. The mirr...
Convert a binary tree into its mirror tree by interchanging left and right children of non-leaf nodes.
Traverse the binary tree in a recursive manner and swap the left and right children of each non-leaf node.
Use a temporary variable to swap the children of each node.
Ensure to handle cases where a node may have only one child or no children.
Implement the function to convert the given binary tree to its mirror tree ...
Given an array 'ARR' of integers with 'N' elements, you need to convert it into a min-binary heap.
A min-binary heap is a complete binary tree where each internal node's val...
Convert the given array into a min-binary heap by following min-heap properties.
Iterate through the array and heapify each node starting from the last non-leaf node to the root.
For each node, compare it with its children and swap if necessary to maintain min-heap property.
Continue this process until the entire array satisfies the min-heap property.
Given an undirected graph of 'V' vertices (labeled 0, 1, ..., V-1) and 'E' edges, the task is to determine whether the graph is bipartite.
A bipartite graph...
The task is to determine whether a given undirected graph is bipartite or not.
Create a function to check if the graph can be colored using two colors without any adjacent vertices sharing the same color.
Use graph coloring algorithms like BFS or DFS to determine if the graph is bipartite.
Check for odd-length cycles in the graph, as a bipartite graph cannot have odd-length cycles.
Consider using a boolean array to ke...
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 sequenc...
The problem involves finding the length of the longest common subsequence between two given strings.
Use dynamic programming to solve the problem efficiently.
Create a 2D array to store the lengths of common subsequences of substrings.
Iterate through the strings to fill the array and find the length of the longest common subsequence.
Return the length of the longest common subsequence for each test case.
I appeared for an interview in Oct 2021.
Round duration - 60 Minutes
Round difficulty - Medium
This was a DS/Algo round.
Timing was 4:00pm-5:00pm IST.
The interviewer was very friendly.
He asked for my introduction.
Given an array/list ASTEROIDS
representing asteroids aligned in a row, each element's absolute value identifies the asteroid's size, while its sign indicates the dir...
Determine the state of asteroids after collisions occur.
Iterate through the array of asteroids and simulate collisions between adjacent asteroids.
Use a stack to keep track of remaining asteroids after collisions.
Handle cases where asteroids moving in opposite directions collide and destroy each other.
Handle cases where asteroids moving in the same direction do not collide.
Given a string 'STR' consisting solely of the characters “{”, “}”, “(”, “)”, “[” and “]”, determine if the parentheses are balanced.
The first line contains an...
The task is to determine if a given string consisting of parentheses is balanced or not.
Use a stack data structure to keep track of opening parentheses
Iterate through the string and push opening parentheses onto the stack and pop when encountering a closing parenthesis
If at the end the stack is empty, the string is balanced, otherwise it is not
Round duration - 60 Minutes
Round difficulty - Medium
Timing was 3:00pm-4:00pm IST
Interviewer was friendly
He asked for my introduction. We dry run the code for the question.
Given a non-empty string 'S' containing no spaces and a dictionary of non-empty strings, generate and return all possible sentences by adding spaces in the string 'S', such...
Given a string and a dictionary, generate all possible sentences by adding spaces between words from the dictionary.
Use backtracking to generate all possible sentences by recursively adding words from the dictionary to the current sentence.
Check if the current substring of the input string exists in the dictionary, if so, add it to the current sentence and continue recursively.
When the entire input string is processed,...
Tip 1: Do not be nervous
Tip 2 : Ask questions from the interviewer if you are confused
Tip 1 : Mention your coding achievement in the resume
Tip 2 : You should have at least one good project on your resume.
I appeared for an interview before May 2021.
Round duration - 60 Minutes
Round difficulty - Easy
This round contained two coding questions. I was also asked some basic android development questions as I had mentioned a couple of projects around android.
Given a binary tree, convert this binary tree into its mirror tree. A binary tree is a tree in which each parent node has at most two children. The mir...
Convert a binary tree into its mirror tree by interchanging left and right children of non-leaf nodes.
Traverse the binary tree in a recursive manner and swap the left and right children of each non-leaf node.
Use a temporary variable to swap the children of each node.
Ensure to handle cases where a node may have only one child or no children.
Implement the function to convert the given binary tree to its mirror tree in pl...
Implementing undo and redo operations for MS Word
Maintain a stack for undo operations and another stack for redo operations
Whenever a change is made, push the previous state onto the undo stack
When undo is triggered, pop the state from undo stack and push it onto redo stack
When redo is triggered, pop the state from redo stack and push it onto undo stack
Ensure to update the document state accordingly after each undo or ...
Round duration - 60 Minutes
Round difficulty - Medium
I was asked two coding questions, some questions around OOPs concepts and DBMS.
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, keeping track of the leftmost node at each level
Use a queue for level order traversal and a map to store the leftmost nodes
Print the values of leftmost nodes stored in the map as the left view of the tree
Design and implement a Trie (Prefix Tree) which should support the following two operations:
1. Insert a word into the Trie. The operation is marked as 'insert(word)'.
2....
Implement a Trie data structure supporting insert and search operations efficiently.
Implement a Trie class with insert and search methods.
Use a nested class Node to represent each node in the Trie.
For insert operation, iterate through each character in the word and create nodes as needed.
For search operation, traverse the Trie based on the characters in the word to check for existence.
Return 'TRUE' if the word is found...
Tip 1 : Focussing on DSA is essential for freshers, most of the companies' interview process will contain DSA questions.
Tip 2 : Stay stick to the basic concepts and don't feel overwhelmed by the advance concepts, most of the companies' will judge you on your foundation/basics.
Tip 1 : Resume should be one pager document which enables user to understand your background. Understand the difference between CV and resume.
Tip 2 : Be as honest as you can on your resume. However, writing that you are a beginner for this particular skill is fine.
I appeared for an interview before Nov 2020.
Round duration - 90 Minutes
Round difficulty - Medium
1. 90 min , can do anytime between a designated 4 hr window
2. was on Hackerrank, and I was familiar with the platform
3. had 3 coding questions
Given an undirected graph of 'V' vertices (labeled 0, 1, ..., V-1) and 'E' edges, the task is to determine whether the graph is bipartite.
A bipartite grap...
The task is to determine whether a given undirected graph is bipartite or not.
Create a function to check if the graph can be colored using two colors without any adjacent vertices sharing the same color.
Use graph coloring algorithms like BFS or DFS to determine if the graph is bipartite.
Check for odd-length cycles in the graph, as a bipartite graph cannot have odd-length cycles.
Consider using a boolean array to keep tr...
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.
Use dynamic programming to solve the problem efficiently.
Create a 2D array to store the lengths of common subsequences of substrings.
Iterate through the strings to fill the array and find the length of the longest common subsequence.
Return the length of the longest common subsequence for each test case.
Given an array 'ARR' of integers with 'N' elements, you need to convert it into a min-binary heap.
A min-binary heap is a complete binary tree where each internal node's va...
Convert the given array into a min-binary heap by following min-heap properties.
Iterate through the array and heapify each node starting from the last non-leaf node to the root.
For each node, compare it with its children and swap if necessary to maintain min-heap property.
Continue this process until the entire array satisfies the min-heap property.
Round duration - 60 minutes
Round difficulty - Hard
With manager
1. DS/algo
2. Networking
3, basic project stuff
4. Google meet
3. was in the afternoon
Implement a wildcard pattern matching algorithm to determine if a given wildcard pattern matches a text string completely.
The wildcard pattern may include the...
Implement a wildcard pattern matching algorithm to determine if a given wildcard pattern matches a text string completely.
Create a dynamic programming matrix to store intermediate results
Handle cases for '?' and '*' characters separately
Check if the characters match or '*' can be used to match any sequence of characters
Given a binary tree, your task is to print the left view of the tree.
The input will be in level order form, with node values separated by a...
Print the left view of a binary tree given in level order form.
Traverse the tree level by level and print the first node of each level (leftmost node)
Use a queue to keep track of nodes at each level
Time complexity should be O(n) where n is the number of nodes in the tree
Tip 1 : Interview Preparation is different from competitive coding. One has not to be a master, to ace faang interviews. CP is like solving puzzles.
Tip 2 : In interview be as descriptive as you can. Try to demonstrate the what you are thinking and the path you took to reach the solution ( whether or not it is correct )
Tip 3 : Try to improve your communication skills ( Trust me it matters a lot )
Tip 1 : Have a master resume and align it with the company requirements and position you are applying
Tip 2 : Include the projects that you actually worked on or have the knowledge about it
Top trending discussions
I applied via Campus Placement and was interviewed in Jan 2024. There were 4 interview rounds.
Easy to medium level of leet code
Answering questions related to Fibonacci series, string palindrome, and counting repeated numbers in an array.
For Fibonacci series with recursion, write a function that calls itself to calculate the next number in the series.
For Fibonacci series without recursion, use a loop to calculate the series.
For string palindrome, compare characters from start and end of the string.
To count all repeated numbers from the array, u...
Rotate array to find max sum of i*A[i]
Rotate array to bring maximum element to front
Calculate sum of i*A[i] for each rotation
Keep track of maximum sum found
I applied via Campus Placement and was interviewed in Sep 2023. There was 1 interview round.
3 Questions were asked out of which if you did 2 you were shortlisted for next round. Questions were mostly from topics like array, string and greedy
I applied via LinkedIn and was interviewed in Dec 2023. There was 1 interview round.
posted on 10 Jun 2025
I appeared for an interview in May 2025, where I was asked the following questions.
I appeared for an interview in Jan 2021.
Round duration - 60 Minutes
Round difficulty - Easy
4 Questions which were of Easy, Medium, and Hard level.
The structure of a binary tree has been modified so that each node includes a reference to its parent node.
You are provided with two nodes,...
This question is about finding the lowest common ancestor of two nodes in a binary tree with parent references.
Traverse from the given nodes to their respective root nodes and store the paths in two separate lists.
Compare the two lists and find the last common node.
Return the last common node as the lowest common ancestor.
Ninja has been given an array, and he wants to find a subarray such that the sum of all elements in the subarray is maximum.
A subarray 'A' is considered greater than a...
The problem is to find a subarray with the maximum sum in a given array.
Iterate through the array and keep track of the maximum sum and the current sum.
If the current sum becomes negative, reset it to 0.
Update the maximum sum if the current sum is greater.
Also keep track of the start and end indices of the subarray with the maximum sum.
Return the subarray using the start and end indices.
Round duration - 50 Minutes
Round difficulty - Easy
Given a list of integers of size N
, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X
is the firs...
The task is to find the next greater element for each element in an array.
Iterate through the array from right to left.
Use a stack to keep track of the elements that have a greater element to their right.
For each element, pop elements from the stack until a greater element is found or the stack is empty.
If a greater element is found, it is the next greater element for the current element.
If the stack becomes empty, the...
You are given a long type array/list ARR
of size N
, representing an elevation map. The value ARR[i]
denotes the elevation of the ith
bar. Your task is to determine th...
The question asks to find the total amount of rainwater that can be trapped in the given elevation map.
Iterate through the array and find the maximum height on the left and right side of each bar.
Calculate the amount of water that can be trapped at each bar by taking the minimum of the maximum heights on both sides and subtracting the height of the bar.
Sum up the amount of water trapped at each bar to get the total amo...
Round duration - 30 Minutes
Round difficulty - Easy
It is just a formality round, asked basic questions like relocation and joining date etc
Tip 1 : Be good with all data structures and algorithms
Tip 2 : Able to explain your projects well
Tip 3 : focus on basics
Tip 1 : Try to make a single-page resume.
Tip 2 : Don't write unnecessary details like hobbies, family, etc.
I applied via Recruitment Consulltant and was interviewed in Sep 2021. There were 2 interview rounds.
Apti and coding
Store Manager
109
salaries
| ₹3.8 L/yr - ₹7 L/yr |
Community Operations Specialist
100
salaries
| ₹2.7 L/yr - ₹4.3 L/yr |
Procurement Manager
96
salaries
| ₹3.5 L/yr - ₹7 L/yr |
Inward Executive
93
salaries
| ₹1.8 L/yr - ₹3.5 L/yr |
Delivery Boy
89
salaries
| ₹0.5 L/yr - ₹4.5 L/yr |
Swiggy
Zepto
Porter
Rapido