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

SDE - 1

Dunzo
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: Data Structure and Algorithms, DFS, BFS, Hashing, Graphs
Tip
Tip

Tip 1 : Practice Graph and Trees Medium and Hard level questions
Tip 2 : Practice completing 2 Medium level questions in 60 minutes
Tip 3 : Try to give the optimized answer with space and time complexity

Application process
Where: Referral
Resume Tip
Resume tip

Tip 1 : Mention your coding platforms links in your resume.
Tip 2 : Keep it limited to 1 page. The main focus should be on your projects and previous experience or internships. Do write a short summary about the work that you did or add some git repos links for your project.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date17 Jun 2022
Coding problem2

1. Count Complete Binary Tree Nodes

Easy
10m average time
90% success
0/40
Asked in companies
FacebookDunzoLinkedIn

Given a complete binary tree, you are supposed to return the number of nodes in the given tree.

In a complete binary tree every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible.

For example:
For the binary trees in the image below.

alt text

The left tree in the image is not a complete binary tree that’s why it is invalid and the right tree in the image is a valid complete binary tree which contains total 6 nodes.
Problem approach

Key Point: A complete binary tree can have at most (2h – 1) nodes in total where h is the height of the tree .
Step 1: Compare the left sub-tree height with the right sub-tree height.
Step 2: If they are equal it is a full tree, then the answer will be 2^height – 1.
Step 3: Otherwise, recursively call for the function for the left and right sub-trees and return the sum of them + 1 as the resultant count of nodes.

Time Complexity: O((log N)^2)
Auxiliary Space: O(log N)

Try solving now

2. Collect Maximum Coins in Matrix

Moderate
0/80
Asked in companies
OracleAdobeDunzo

You are given a matrix of ‘M’ rows and ‘N’ columns. The cells of the matrix contain either a coin or are empty.

You are allowed to visit every boundary cell that has a coin in it and collects that coin apart from that, you are allowed to collect the coin in one of the four adjacent cells. Find the maximum number of coins that you can collect from the matrix.

For Example :
If Matrix of size 3 * 5 is: 
0 1 1 0 0
0 1 0 1 0
1 0 0 0 0


Then, out of the five coins in the matrix, you can collect a maximum of four coins. This is because the coin at (0, 1) lies on the boundary and after collecting the coin one can also collect the coin at (1, 1) as it lies in the adjacent cell. We can also collect the coin at (2, 0). But we cannot collect the coin at (1, 3), as this coin doesn’t lie on the boundary and it cannot be reached from one of the boundary coins.
Problem approach

Step 1 : Sort the piles in Ascending Order.
Step 2 : Initialize maxCoins = 0 and 2 pointers i = 0 and j =piles.size() - 2
Step 3 : As the goal is to maximize your coins. And you will pick a pile always after Alice. So let Alice pick the largest pile from the end, you pick the second largest pile and Bob will pick the smallest pile from the start.
Step 4 : Keep adding the count of piles to maxCoins till j > i;

Try solving now
02
Round
Hard
Video Call
Duration60 minutes
Interview date22 Jun 2022
Coding problem2

1. Maximum Sum No Larger Than K

Hard
25m average time
60% success
0/120
Asked in companies
DunzoAmazonCIS - Cyber Infrastructure

You are given an ‘N’ x ‘M’ matrix ‘MAT’ and an integer ‘K’. Your task is to find the maximum sum of a rectangle in the matrix which is less than or equal to ‘K’.

For Example:

You are given ‘MAT’= [[1, 2],[3, 4]] and ‘K’ = 8. 

Then the answer will be 7 (the sum of the red rectangle).
Problem approach

Step 1 : Try to reduce the 2D matrix to 1D with row-wise sum.
Step 2 : Find the maximum sum in that 1D array which is at most K.

Time Complexity: O(col*col*row*log(row))
Space Complexity: O(row)

Try solving now

2. Arithmetic Subarrays

Easy
20m average time
80% success
0/40
Asked in companies
AmazonDunzoHCL Technologies

You are given an array ‘A’ of length ‘N’, you have to tell the number of arithmetic subarrays that exist in the array ‘A’.

An Arithmetic subarray is a subarray that has 3 or more elements and the difference between consecutive elements is the same. Eg: [1, 3, 5, 7] has a length of 4, and diff between any two consecutive elements is 2.

Note:
A subarray is a slice from a contiguous array (i.e., occupy consecutive positions) and inherently maintains the order of elements.
Problem approach

Step 1 : Create a map(M1) and store the count of all the numbers.
Step 2  :For all those numbers whose count is greater than 3. Add that to answer.
Step 3 : For rest of the numbers run a nested loop with the map(M1 and M1) and store the difference count in a another map(M2).
Step 4 : Traverse over the map(M2) and all those difference where the count is greater than 3 add then to the answer.

Time Complexity: O(N^2)
Space Complexity: O(N)

Try solving now
03
Round
Easy
HR Round
Duration45 minutes
Interview date27 Jun 2022
Coding problem1

1. Basic HR Questions

  • Introduce Yourself
  • What do you think is your biggest approach till now?
  • What interests you in the IT industry?
Problem approach

Tip 1 : Work on your communication skills for this Round.
Tip 2 : Be Confident While giving any answer.
Tip 3 : You should have a good knowledge of what projects you worked on.

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
115097 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
35147 views
7 comments
0 upvotes