Dunzo interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Dunzo
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
When I joined college, I was unaware of Data Structures and Algorithms, which made my journey to getting an internship much more complicated. From that point, I started doing coding questions on CodeStudio.
Application story
This company visited my campus for the placement, where I applied for it.
Why selected/rejected for the role?
I was rejected because I was not able to provide a good approach to the DSA questions that were being asked.
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Practice on CodeStudio and solve medium-level problems on CodeStudio.
Tip 2: Brush up on computer fundamentals from subjects like OS, DBMS, and CN.
Tip 3: Have a strong project or internship experience and in-depth work knowledge.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1: Have some projects on your resume.
Tip 2: Do not put false information on your resume.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date24 Dec 2022
Coding problem2

1. Find Peak Element

Easy
15m average time
85% success
0/40
Asked in companies
DunzoHikeAdobe

You are given an array 'arr' of length 'n'. Find the index(0-based) of a peak element in the array. If there are multiple peak numbers, return the index of any peak number.


Peak element is defined as that element that is greater than both of its neighbors. If 'arr[i]' is the peak element, 'arr[i - 1]' < 'arr[i]' and 'arr[i + 1]' < 'arr[i]'.


Assume 'arr[-1]' and 'arr[n]' as negative infinity.


Note:
1.  There are no 2 adjacent elements having same value (as mentioned in the constraints).
2.  Do not print anything, just return the index of the peak element (0 - indexed).
3. 'True'/'False' will be printed depending on whether your answer is correct or not.


Example:

Input: 'arr' = [1, 8, 1, 5, 3]

Output: 3

Explanation: There are two possible answers. Both 8 and 5 are peak elements, so the correct answers are their positions, 1 and 3.


Problem approach

Divide and Conquer can be used to find a peak in O(Log n) time. The idea is based on the technique of Binary Search to check if the middle element is the peak element. If the middle element is not the peak element, check if the element on the right side is greater than the middle element; in that case, there is always a peak element on the right side. If the element on the left side is greater than the middle element, there is always a peak element on the left side. By forming a recursion, the peak element can be found in O(log n) time.

Try solving now

2. Shortest Common Supersequence

Hard
25m average time
0/120
Asked in companies
Dream11SamsungHCL Technologies

Given two strings, ‘A’ and ‘B’. Return the shortest supersequence string ‘S’, containing both ‘A’ and ‘B’ as its subsequences. If there are multiple answers, return any of them.

Note: A string 's' is a subsequence of string 't' if deleting some number of characters from 't' (possibly 0) results in the string 's'.

For example:
Suppose ‘A’ = “brute”, and ‘B’ = “groot”

The shortest supersequence will be “bgruoote”. As shown below, it contains both ‘A’ and ‘B’ as subsequences.

A   A A     A A
b g r u o o t e
  B B   B B B  

It can be proved that the length of supersequence for this input cannot be less than 8. So the output will be bgruoote.
Problem approach

This problem is closely related to the longest common subsequence problem.
Steps:

  1. Find the Longest Common Subsequence (LCS) of the two given strings.
  2. Insert the non-LCS characters (in their original order in the strings) into the LCS found above and return the result.
Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date24 Dec 2022
Coding problem2

1. Shortest Path in a Binary Matrix

Moderate
37m average time
65% success
0/80
Asked in companies
SprinklrCIS - Cyber InfrastructureMakeMyTrip

You have been given a binary matrix of size 'N' * 'M' where each element is either 0 or 1. You are also given a source and a destination cell, both of them lie within the matrix.

Your task is to find the length of the shortest path from the source cell to the destination cell only consisting of 1s. If there is no path from source to destination cell, return -1.

Note:
1. Coordinates of the cells are given in 0-based indexing.
2. You can move in 4 directions (Up, Down, Left, Right) from a cell.
3. The length of the path is the number of 1s lying in the path.
4. The source cell is always filled with 1.
For example -
1 0 1
1 1 1
1 1 1
For the given binary matrix and source cell(0,0) and destination cell(0,2). Few valid paths consisting of only 1s are

X 0 X     X 0 X 
X X X     X 1 X 
1 1 1     X X X 
The length of the shortest path is 5.
Problem approach

Algorithm:

  1. Start from the source cell and call the BFS procedure.
  2. Maintain a queue to store the coordinates of the matrix and initialize it with the source cell.
  3. Also, maintain a Boolean array visited of the same size as the input matrix and initialize all its elements to false.
  4. Loop until the queue is empty.
Try solving now

2. Letter Combinations of a Phone Number

Moderate
35m average time
65% success
0/80
Asked in companies
AmazonOlaGoldman Sachs

Given a string S containing digits from 2 to 9 inclusive. Your task is to find all possible letter combinations that the number could represent.

A mapping from Digits to Letters (just like in Nokia 1100) is shown below. Note that 1 does not map to any letter.

example

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date24 Dec 2022
Coding problem2

1. N Queens

Hard
55m average time
35% success
0/120
Asked in companies
AmazonAdobeIntuit

You are given an integer 'N'. For a given 'N' x 'N' chessboard, find a way to place 'N' queens such that no queen can attack any other queen on the chessboard.

A queen can be killed when it lies in the same row, or same column, or the same diagonal of any of the other queens. You have to print all such configurations.

Try solving now

2. Shortest Palindrome

Moderate
24m average time
75% success
0/80
Asked in companies
DunzoGoldman SachsNsquare

You are given a string ‘STR’. Your task is to find the shortest palindrome that can be formed by adding characters in front of ‘STR’.

For example:
You are given ‘STR’ = “aabcd”. Then our answer will be “dcbaabcd”. We can form a palindrome by adding ‘d’, ‘c’, and ‘b’ in front of ‘STR’.
Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Dunzo
4718 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Dunzo
780 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Dunzo
725 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Dunzo
806 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115096 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58237 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35146 views
7 comments
0 upvotes