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

SDE - Intern

Zomato
upvote
share-icon
1 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Binary Search, Tree, Graph, Dynamic Programming
Tip
Tip

Tip 1 : Practice at-least 300 problems.
Tip 2 : Add at-least 2 projects and prepare them well for the interview.
Tip 3 : Practice mock interviews with your friends to learn how to explain problems.

Application process
Where: Referral
Eligibility: No criteria as such but having good projects create an impact.
Resume Tip
Resume tip

Tip 1 : Follow some standard resume format and add 2-3 projects with explanations in point, also include technologies used in the project.
Tip 2 : Make sure you add all the technologies you are aware of in your resume and also, add links to competitive profiles (if you have good coding profiles).
Tip 3 : Add your achievements in the resume in points.

Interview rounds

01
Round
Medium
Video Call
Duration90 minutes
Interview date21 Aug 2021
Coding problem5

The interview started in the evening on google meet. and extended for 90 minutes. The interviewer was very helpful and he shared a collaborative code editor to discuss several problems.

1. Two Sum

Easy
10m average time
90% success
0/40
Asked in companies
Chegg Inc.FacebookAmazon

You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.

Note:

We cannot use the element at a given index twice.

Follow Up:

Try to do this problem in O(N) time complexity. 
Problem approach

Step 1 : I first explained an iterative approach for the problem. The solution had O(N) complexity.
Step 2 : Interviewer asked me to optimise the solution.
Step 3 : Then I gave a solution that involved using binary search as the array was already in sorted order that reduced the solution complexity to O(log N) and the interviewer was happy.

Try solving now

2. Convert a binary tree to its sum tree

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

Given a binary tree of integers, you are supposed to modify the given binary tree to a sum tree where each node value is replaced by the sum of the values of both left and right subtrees in the given tree. The value of leaf nodes is changed to zero.

Example:
Below is the example showing the input tree and its sum tree.  

alt text

Problem approach

Step 1 : I explained a solution that involves calling nodes reclusively and calculating the sum of all children and adding them together to check the condition. After calculating I returned sum of children with the node value from the function. 

The solution has time complexity of O(N) when N is number of nodes and the interviewer was happy with my approach.

Try solving now

3. LFU Cache

Moderate
0/80
Asked in companies
SalesforceOLX GroupDisney + Hotstar

Design and implement a Least Frequently Used(LFU) Cache, to implement the following functions:

1. put(U__ID, value): Insert the value in the cache if the key(‘U__ID’) is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least frequently used item before inserting the new item.

2. get(U__ID): Return the value of the key(‘U__ID’),  present in the cache, if it’s present otherwise return -1.
Note:
  1) The frequency of use of an element is calculated by a number of operations with its ‘U_ID’ performed after it is inserted in the cache.

  2) If multiple elements have the least frequency then we remove the element which was least recently used. 

You have been given ‘M’ operations which you need to perform in the cache. Your task is to implement all the functions of the LFU cache.

Type 1: for put(key, value) operation.
Type 2: for get(key) operation.
Example:
We perform the following operations on an empty cache which has capacity 2:

When operation 1 2 3 is performed, the element with 'U_ID' 2 and value 3 is inserted in the cache.

When operation 1 2 1 is performed, the element with 'U_ID' 2’s value is updated to 1.  

When operation 2 2 is performed then the value of 'U_ID' 2 is returned i.e. 1.

When operation 2 1 is performed then the value of 'U_ID' 1 is to be returned but it is not present in cache therefore -1 is returned.

When operation 1 1 5 is performed, the element with 'U_ID' 1 and value 5 is inserted in the cache. 

When operation 1 6 4 is performed, the cache is full so we need to delete an element. First, we check the number of times each element is used. Element with 'U_ID' 2 is used 3 times (2 times operation of type 1 and 1-time operation of type 1). Element with 'U_ID' 1 is used 1 time (1-time operation of type 1). So element with 'U_ID' 1 is deleted. The element with 'U_ID' 6 and value 4 is inserted in the cache. 
Problem approach

I used min-heap to implement LFU , as it handles insertion, deletion, and update in logarithmic time complexity. A tie can be resolved by removing the least recently used cache block. I also used an hashmap to store the indices of the cache blocks which allows searching in constant time.

The interviewer was happy with my solution

Try solving now

4. DBMS Question

Write a SQL query to find X percentile of the student.

Problem approach

Tip 1 : Practice SQL queries from different websites.
Tip 2 : Use different websites for quick revision of common SQL commands.

5. OOPS Question

Interviewer asked me about Polymorphism and about real time and run time polymorphism also with the examples.

Problem approach

Tip 1 : Read OOPs concepts thoroughly.

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 | 3 problems
Interviewed by Zomato
1596 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 5 problems
Interviewed by Zomato
0 views
0 comments
0 upvotes
SDE - Intern
2 rounds | 4 problems
Interviewed by Zomato
1368 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
10142 views
2 comments
0 upvotes