i
Dunzo
Filter interviews by
Clear (1)
I was interviewed 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 was interviewed 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
I was interviewed 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.
Top trending discussions
I was interviewed in Nov 2020.
Round duration - 90 mintues
Round difficulty - Easy
Nice environment everything went good.
Given an integer 'N', calculate and print the sum of the least common multiples (LCM) for each integer from 1 to N with N.
The sum is represented as:LCM(1, N) + LCM(2, N) + ....
Calculate and print the sum of least common multiples (LCM) for each integer from 1 to N with N.
Iterate from 1 to N and calculate LCM of each pair with N
Sum up all the calculated LCMs to get the final result
Implement a function to calculate LCM of two numbers
Given a binary tree, return the vertical order traversal of the values of the nodes in the tree.
In a vertical order traversal, for each node at position (X, Y)...
Vertical order traversal of binary tree is obtained by running a vertical line from -∞ to +∞ and adding node values in top to bottom order, sorted by decreasing Y coordinates.
Implement a function to perform vertical order traversal of a binary tree
Maintain a map to store nodes at each vertical level
Sort the nodes at each level by their Y coordinates in decreasing order
Handle cases where two nodes share the same positio
Round duration - 90 minutes
Round difficulty - Hard
It was a tough round focus on the key concepts
Create a stack data structure that supports not only the usual push and pop operations but also getMin(), which retrieves the minimum element, all in O(1) time complexity witho...
Implement a stack with getMin operation in O(1) time complexity without using extra space.
Use two stacks - one to store the actual elements and another to store the minimum values encountered so far.
When pushing an element, check if it is smaller than the current minimum and if so, push it onto the minimum stack.
When popping an element, check if it is the current minimum and if so, pop from the minimum stack as well.
Fo...
Tip 1 : Prepare Data structure and algorithm
Tip 2 : RDBMS and OS are also important
Tip 3 : Focus on CAO
Tip 1 : Have some projects on resume.
Tip 2 : Always write things which you can explain there
I was interviewed in Sep 2020.
Round duration - 90 mintues
Round difficulty - Medium
Goes good no problem at all exam is between 10 to 11:30.
Rafiq loves to play with piles of dominoes, especially when they are of equal heights. His father gifted him 'N' piles of dominoes, each with a positive number of stacke...
Calculate minimum cost to make consecutive windows of domino piles equal in height.
Iterate through each window of size 'K' and calculate the minimum cost to make all piles in that window equal in height.
Keep track of the running sum of domino heights in each window to minimize cost.
Return the minimum cost for each window as the output.
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 - 90 minutes
Round difficulty - Hard
Goes good no problem at all exam at same time between 10 to 11:30.
You are given two sorted integer arrays, ARR1
and ARR2
, with sizes M
and N
, respectively. Merge these arrays into ARR1
as a single sorted array. Assume ARR1
has a size equa...
Merge two sorted arrays into one sorted array in place.
Iterate from the end of both arrays and compare elements, placing the larger element at the end of ARR1
Continue this process until all elements from ARR2 are merged into ARR1
Ensure to handle cases where one array is fully merged before the other
Tip 1 : Do atleast 1 good projects
Tip 2 : Practice Atleast 300 Questions
Tip 3 : Should be able to explain your project
Tip 1 : Always be true with the resume
Tip 2 : Do not put false things on resume.
I was interviewed before Sep 2020.
Round duration - 90 minutes
Round difficulty - Medium
There were a total of three questions of 100, 200, and 300 points respectively. Partial points were given if partial tests got passed for any problem. The Codesignal environment was similar to Hackerrank, so not much different. I think the test was held in the afternoon time.
Two players, 'Ale' and 'Bob', are playing a game with a pile of stones. Your task is to determine the winner if both play optimally.
1. On each turn, ...
Determining the winner of a game where two players take turns to remove stones from a pile based on certain rules.
Implement a recursive function to simulate the game where each player makes the optimal move.
Check if the current player can take any stones, if not, the other player wins.
Return 'Ale' if 'Ale' wins, otherwise return 'Bob'.
Given an integer array 'ARR' of size 'N' and an integer 'K', return all the subsets of 'ARR' which sum to 'K'.
A subset of an array 'ARR' is a tupl...
Given an array and an integer, return all subsets that sum to the given integer.
Use backtracking to generate all possible subsets of the array.
Keep track of the current subset and its sum while backtracking.
If the sum of the subset equals the target sum, add it to the result.
Recursively explore both including and excluding the current element in the subset.
Sort the elements in each subset to ensure increasing order of
Round duration - 60 minutes
Round difficulty - Medium
This round was a video call round held on Zoom and the Codesignal platform was to be used for coding the problems. The round started with the interviewer giving a small introduction about him and then asking me to introduce myself.
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
Find the minimum time required to rot all fresh oranges in a grid.
Use Breadth First Search (BFS) to simulate the rotting process of oranges.
Track the time taken to rot all oranges and return -1 if any fresh oranges remain.
Handle edge cases such as empty grid, no fresh oranges, or no rotten oranges.
Update the status of adjacent fresh oranges to rotten oranges in each iteration.
Given an integer array arr
of size N
, your task is to determine all indices of local minima and local maxima within the array. Return these indices in a 2-D list, ...
Find indices of local minima and maxima in an integer array.
Iterate through the array and compare each element with its neighbors to find local minima and maxima.
Consider corner elements separately by comparing with only one neighbor.
Return the indices of local minima and maxima in a 2-D list.
Round duration - 60 minutes
Round difficulty - Medium
The setup was exactly similar to the first interview round. The interviewer was very friendly. My advice will be to see the interviewer as a team mate and think you have to solve the question together with him. Don't panic and start speaking out what observations you can make about the problem.
Given an array or list ARR
of N
positive integers and an integer K
, your task is to rearrange all elements such that those with the K-th
bit (considering the rightmost bit as '1st' bit) eq...
Rearrange elements in an array based on the K-th bit being 0 or 1.
Iterate through the array and separate elements based on the K-th bit being 0 or 1.
Maintain the relative order of elements within each group.
Combine the two groups to get the final rearranged array.
Time complexity can be optimized to linear time by using bitwise operations.
Example: For ARR = {1, 2, 3, 4} and K = 1, output should be {2, 4, 1, 3}.
Round duration - 60 minutes
Round difficulty - Medium
It was already night time till this interview started because all the three interview rounds were held on the same day. This was not a DS+Algorithms round. He first asked me to introduce myself. So I started by telling what all I have done in my college up till now and then I told him about my internship experience at myKaarma which just ended few days back. There was around 10-15 minutes discussion on what I was working on in my intern project.
Tip 1 : Try to learn DS+Algorithms from the basics in the starting phase of your preparation. Though, in the later stages of the preparation, some cramming can be employed for the problems generally asked in the interviews (but that too with proper understanding)
Tip 2 : Don't forget to prepare topics like OS and OOP. Although I was not asked much about these topics but my friends were asked some questions from these topics. These topics can be prepared in 2-3 days from YouTube itself.
Tip 3 : For an intern role interview, 2-3 projects including the college projects should be enough. You should be prepared to explain your project answer the basic questions like the approach which you followed, the problems you faced during the project, etc.
Tip 4 : If possible you can have a prior intern experience as well, but one thing for sure, preparing DS+Algorithms is much more important than this.
Tip 1 : Writing things which you don't know about properly won't give you much benefit. Rather, they can get you into problem if asked about them.
Tip 2 : Writing much about the things like extra curricular activities in the resume for software roles don't give you much benefit in my opinion. Though I wrote 2-3 PORs which had.
Tip 3 : Trying to make your resume longer unnecessarily won't give you any benefit.
I applied via Campus Placement and was interviewed in Mar 2024. There were 2 interview rounds.
Graphs ,arrays , Hashmaps and Heaps
Changes on graph structure involve adding, removing, or modifying nodes and edges.
Adding a new node to the graph
Removing an existing node from the graph
Modifying the weight of an edge in the graph
I was interviewed in Dec 2020.
Round duration - 90 minutes
Round difficulty - Easy
This round had 2 coding problems and we had to code it on hackerearth only.
The use of Outside IDE was forbidden.
The timing of test was 12:00 PM to 1:30 PM.
Ninja is tasked with organizing a meeting in an office that starts at time ‘0’ and ends at time ‘LAST’. There are ‘N’ presentations scheduled with given start and end times....
Reschedule at most K presentations to maximize gap without overlap.
Iterate through presentations and calculate the gaps between them
Sort presentations by end time and reschedule K presentations to maximize gap
Return the longest gap achieved
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...
Calculate total unique paths from top-left to bottom-right corner of a 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.
Initialize the first row and first column with 1 as there is only one way to reach them.
For each cell, the number of unique paths is the sum of paths from the cell above and the cell to the...
Round duration - 90 minutes
Round difficulty - Medium
This round was coding round with discussion .
The interviewer tried to trick the questions and wanted to test how we respond if something is asked out of preparation.
The code we ran on Google Docs was checked on Online IDE if it ran for sample inputs.
Timing : 12:00 PM to 1:30 PM
You are given a graph with 'N' vertices labeled from 1 to 'N' and 'M' edges. In one operation, you can shift an edge from being between two directly connected vertice...
Determine the minimum number of operations to connect a graph by shifting edges between disconnected vertices.
Use a disjoint set union (DSU) data structure to keep track of connected components.
Count the number of connected components in the graph.
The minimum number of operations required is equal to the number of connected components minus 1.
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) algorithm to find the shortest path on the board.
Create a mapping of each cell to its corresponding row and column on the board.
Consider the presence of snakes and ladders while calculating the next possible moves.
Handle the case where the last cell is unreachable by returning -1.
Optimize ...
Round duration - 75 minutes
Round difficulty - Hard
This was a problem solving round and lasted for 75 minutes. The interviewer gave me a very complicated question.
The round was held on Google Meet and I was supposed to tell him the approach and write code on shared Google Docs.
Assume you initially have an empty array called ARR
. You are required to return the updated array after executing Q
number of queries on this array.
There are two types of que...
Implement a function to update an array based on XOR queries.
Create an empty array to store the elements.
Iterate through each query and update the array accordingly.
Use bitwise XOR operation to update the elements.
Ensure to handle both types of queries - insert and XOR operation.
Tip 1 : prepare all Topics from Coding Ninjas of Course Competitive Programming. Also I practiced atleast one question everyday from sites like Leetcode,Interviewbit and also took part in Codeforces Contest.
Tip 2 : Though Data Structure is the base for any tech interview, one must know some other subjects as well like Operating System, Networking, and Database Management System for which I took help from Coding Ninja’s notes and from GeeksforGeeks.
Tip 1 : Keep your resume up to date and mention 2-3 good level projects which will give a good impression to the interviewer .
Tip 2 : Don't put false things on the resume.
I was interviewed in Dec 2020.
Round duration - 45 minutes
Round difficulty - Medium
The nature of the interviewer was very kind. The test was proctored, our webcam and mic were on, and shared my screen.
Given a binary tree of integers, find its diagonal traversal. Refer to the example for clarification on diagonal traversal.
Consider lines at a...
Diagonal traversal of a binary tree involves printing nodes at the same diagonal in a specific order.
Traverse the tree in a diagonal manner, starting from the root node and moving towards the right child and then the left child.
Use a queue to keep track of nodes at each level of the tree.
Print the nodes in each diagonal level in the order they are encountered.
Example: For the given binary tree, the diagonal traversal w
You are given a Binary Tree, and you need to determine the length of the diameter of the tree.
The diameter of a binary tree is the length of the longest path betwe...
The task is to find the diameter of a binary tree, which is the longest path between any two nodes in the tree.
Traverse the tree to find the longest path between any two nodes.
Keep track of the maximum diameter found during traversal.
The diameter may not necessarily pass through the root node.
Consider both left and right subtrees while calculating the diameter.
Example: For input '1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1',
Round duration - 45 Minutes
Round difficulty - Medium
The nature of the interviewer was very kind, helped me when I stuck. The test was proctored, our webcam and mic were on, and shared my screen.
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...
Find the Next Greater Element for each element in a list of integers.
Iterate through the list of integers from right to left.
Use a stack to keep track of elements for which the Next Greater Element is not yet found.
Pop elements from the stack until a greater element is found or the stack is empty.
Assign the Next Greater Element as the top element of the stack or -1 if the stack is empty.
Given an array/list of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Provide true
if such a subset exists, otherwise r...
Given an array of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store if a subset sum is possible for each element and target sum.
Iterate through the array and update the 2D array based on the current element and target sum.
Check if the 2D array contains true for the target sum at the end.
Round duration - 45 Minutes
Round difficulty - Medium
The nature of the interviewer was very kind, helped me when I stuck. The test was proctored, our webcam and mic were on, and shared my screen.
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell ...
The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.
Iterate through the array of stock prices and keep track of the maximum profit that can be achieved with two transactions.
Maintain variables to store the maximum profit after the first buy-sell, the maximum profit after the second buy-sell, and the minimum price encountered s...
Tip 1 : Do at least 1 projects at any technology
Tip 2 : Learn DSA at least these topics Array, LL, Tree, DP
Tip 1 : At least mention the projects or internships on your resume.
Tip 2 : Avoid unnecessary details like Hobbies, declaration, date.
Community Operations Specialist
116
salaries
| ₹0 L/yr - ₹0 L/yr |
Store Manager
104
salaries
| ₹0 L/yr - ₹0 L/yr |
Procurement Manager
104
salaries
| ₹0 L/yr - ₹0 L/yr |
Delivery Boy
91
salaries
| ₹0 L/yr - ₹0 L/yr |
Inward Executive
90
salaries
| ₹0 L/yr - ₹0 L/yr |
Swiggy
Zepto
Porter
Rapido