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

SDE - Intern

Zomato
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 months
Topics: Data structures, Dynamic programming, Graph theory ,OOPS, Web development
Tip
Tip

Tip 1 : Do at least two projects
Tip 2 : Be regular in giving competitive programming contests
Tip 3 : Be your resume

Application process
Where: Campus
Eligibility: No
Resume Tip
Resume tip

Tip 1 : Be your resume
Tip 2 : Have some achievements in competitive programming and at least 2 projects

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date30 Aug 2022
Coding problem2

It was in the evening 
The environment was good enough

1. Lexicographically Smallest Array

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

You have been given an array/list ARR consisting of ‘N’ integers. You are also given a positive integer ‘K’.

Your task is to find the lexicographically smallest ARR that can be obtained by swapping at most K consecutive elements.

An array/list P is lexicographically smaller than its permutation Q if and only if, for the earliest index at which P and Q differ, P's element at that index is smaller than Q's element at that index. Example, P = [1, 12, 4, 7, 8] is lexicographically smaller than Q = [1, 12, 8, 4, 7].

For example, if ARR = [70, 60, 90, 21, 11] and K = 3, then-

Swap 1: We swap adjacent elements 90 and 21. So, ARR after one swap is [70, 60, 21, 90, 11].
Swap 2: We swap adjacent elements 60 and 21. So, ARR after one swap is [70, 21, 60, 90, 11].
Swap 3: We swap adjacent elements 70 and 21. So, ARR after one swap is [21, 70, 60, 90, 11].
The lexicographically smallest ARR after K = 3 swaps is [21, 70, 60, 90, 11].
Problem approach

The key point is to observe the answer. If we have B swaps, what does the starting of the permutation look like?

The permutation starts with N for sure and continues with (n-1), (n-2), …, (n-B+1).

Use greedy approach to make the largest lexicographical value array.

Try solving now

2. Inorder Successors

Moderate
30m average time
75% success
0/80

Ninja has recently learnt about the heirarchial structure of Binary trees. Now, he wants to find the inorder successor of each node in a Binary Tree and want to implement that in a well mannered code.

Ninja is stucked in the problem and he is asking for your help. Help Ninja!

Note:

The Inorder Successor of a node in a binary tree is the next node in Inorder traversal of the Binary Tree. It is supposed to be NULL for the last node in Inorder traversal, for which suppose it to be ‘-1’.
For example :
For the given binary tree:

Example

The inorder traversal of the tree will be: 4 -> 2 -> 5 -> 1 -> 6 -> 3 -> 7
Hence, the inorder successor of each node will be: 4 -> 2 2 -> 5 5 -> 1 1 -> 6 6 -> 3 3 -> 7 7 -> -1
Try solving now
02
Round
Easy
Video Call
Duration90 minutes
Interview date10 Sep 2022
Coding problem2

It was in afternoon 
The interviewer was very good and tried to make me as comfortable as he could

1. Puzzle

There are 25 horses, and 5 race tracks, find minimum number of races required to find the top 3 fastest horses.

Problem approach

Tip 1 : Solve more puzzles 
Tip 2 : Use pen and paper and put variable names efficiently 

2. Minimum Cost to Destination

Hard
41m average time
30% success
0/120
Asked in companies
OYOAckoBarclays

You have been given an N*M matrix where there are 'N' rows and 'M' columns filled with '0s' and '1s'.


'1' means you can use the cell, and '0' means the cell is blocked. You can move in the 4 following directions from a particular position (i, j):

1. Left - (i, j-1)
2. Right - (i, j+1)
3. Up - (i-1, j)
4. Down - (i+1, j)

Now, for moving in the up and down directions, it costs you $1, and moving to the left and right directions are free of cost.

You have to calculate the minimum cost to reach (X, Y) from (0, 0) where 'X' is the row number and 'Y' is the column number of the destination cell. If it is impossible to reach the destination, print -1.

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

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - Intern
3 rounds | 6 problems
Interviewed by Zomato
3063 views
0 comments
0 upvotes
SDE - Intern
2 rounds | 6 problems
Interviewed by Zomato
0 views
0 comments
0 upvotes
SDE - Intern
2 rounds | 3 problems
Interviewed by Zomato
1595 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 5 problems
Interviewed by Zomato
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15480 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15338 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10141 views
2 comments
0 upvotes