Zomato | SDE Intern | Nov 2024 | Cleared
Anonymous User
1827

Zomato - SDE Backend Intern Interview
Currently - Final Year CSE Student
Applied Offcampus for SDE Intern 6M Role using Referral

Final Result - Offered Internship

ROUND 1

Interviewer was an SDE-III @ Zomato

  • Interview started on a very chill note, casual conversation. I was asked for an introduction and we discussed about my past achievements and why I wanted to work in Zomato and not open my own startup.

Question-
Why did I use MongoDB instead of MySQL in my internship project? In general, what tradeoffs are there b/w using Mongo vs SQL? Why and when to use?

Follow-up: I was explaing a part where I used indexing on one attribute, so the interviewer switched the entire discussion to what are Indexes and how do they work.

Question-
Lets say you have a table with Index on A and Index on B (seperate indexes, not composite).
How would a query perform and work on the backend when it has some condition like - SELECT ALL WHERE A=10 and B=20 ; he wanted to know how such a query would be processed when A and B are seperately indexed.

Follow-up: Is it better to index A and B seperately, or make a composite index AB? In either cases how would the above query perform? which is time / space efficient and why?

  • I told the interviewer that I had no prior knowledge about types of indexes, but we can try to solve it by thinking how the backend might work, and he agreed. So we spent some time breaking down to the very atomic level of how indexes might be working.

  • After spending quite a lot of time on this, we decided to move further, and he wanted me to do a design problem now.

Question: To design an Attendance System with the following requirements

  1. Should have different roles like teacher, dean, student, etc and different views for different role.
  2. Teachers opt for courses and students also opt for courses, and we have to keep track of students' attendance in each course, display it in both student and teacher/dean views.
  3. Student should be able to also see how many classes he must attend to reach above 75% attendance.
  4. Some other features

He wanted me to show him Database Structure, APIs, logic, and also design LOGIN system for same and explain how it would work.

  • I think I spent quite a lot of time on designing the DB because it was my first SD interview, but after I created the tables and all, we discussed about some optimizations which I managed to accomodate and then we moved to login.

  • Asked me difference between Hashing vs Encrypting, couldn't answer clearly.

  • In my login design, I mentioned about creating a session id, which will be sent from user in GET calls when they want to see the dashboard, and will help us to authorize user to the particular view.

Question - If someone else obtains your Session ID, how will you prevent them from logging into the account?

I thought about logging the IP Address of the user on the backend, and making sure that each request for a particular session id comes from the same IP, but he then gave me a follow up-

Follow-up: What if someone has same IP address as yours? What'll you do then?

I tried to think of many approaches, but eventually got out of answers and surrendered.

Duration of Round was almost 1 hr 25 mins.
Received call from HR the next working day informing me that I cleared R1.

ROUND 2

Interviewer was Engineering Manager

Starting Phase

  • Interviewer gave his introduction, shared how he is affiliated with Zomato since 9 years.
  • He asked me for an introduction, but said not to include things written in the Resume.
  • Asked me again why I didn't go for starting my own startup / why am here at Zomato?
  • Asked what was asked in last interview; how was my experience and expectations?

I clearly mentioned, that I am not at all a DSA Guy, and that I have spent most of my time in BTech doing projects and understanding business side of tech.

Question - Tell me about he most challenging technical problem you ever faced.
I explained a hackathon project and the interviewer seemed satisfied after asking 1-2 follow ups that were just for clarification purposes.

Question - Puzzle
10 boxes labelled as [1,2,3,4…..10] (identifiers)
100 apples inside each box - 1kg each
I choose 1 random box and replace all 100 apples inside that box with 0.9kg apples
Identify the identifier of that random box, given that:

  • Digital weighing scale
  • Constraint: you can take the reading only once

Interviewer gave me a timeline of 2 mins to solve, which I obviously couldn't. We tried for about 5 minutes, but eventually skipped the problem to move further.

Question

  • Given N which is an integer, head & tail of a Double Linked List (DLL), delete all the nodes with a value that falls in the Fibonnaci Series that has an upper bound of N.
  • For Example: if N = 25, the series will be 0 1 1 2 3 5 8 13 21 -- rest all is great than 25
  • head -> 9 <-> 10 <-> 8 <-> 21 <-> 6 <- tail | so aim was to return DLL after removing 8, 21

I gave an approach, which seemed optimal to me, but then the interviewer asked me to think of another solution, possibly better than this. I gave another solution, better than the previous one in terms of time, but more space was required; and then he asked me for another solution. I gave him the 3rd solution, and still he asked me for a 4th solution; then 5th solution.

After creating like almost 4 solutions, that were pretty much same in terms of space and time, he asked me to pick one and code it. Clearly mentioned that he is not interested in syntax at all, but logic should be correct in the first go i.e. no loose ends in terms of deletion, series generation, etc.

I decided to code an approach that was less optimal than the best solution I proposed, which amused the interviewer. I did this saying that the best approach I proposed wasn't maintainable and would have poor readibility and understanding for any other person looking at it. The interviewer didn't show literally any sign of either satisfaction / disstatisfaction, which made me pretty underconfident, but I decided to keep my stand of chosing to write the more readable approach.

He evaluated the pseudocode, and seemed satisfied after a few simple follow up questions.

Ending Phase
Gave an extensive feedback, which was positive, and appreciated me taking the stand of writing readable code over optimal code, justifying that it was a very good decision to go with the less optimal one there. He also mentioned that he was never looking for an optimal answer, but rather was interested in me making multiple solutions to the same problem.

Duration of Round: 1 hr 20 mins.
Received the call from the HR in exactly 24hrs to schedule next round.

ROUND 3

Interviewer was VP of Tech in Gurgaon Office.

  • Introduction
  • Previous experiences discussions
  • Why not a startup of my own?
  • Rolled out offer for internship.
  • Some questions I wanted to ask.
Comments (1)