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

Associate Software Engineer

Swiggy
upvote
share-icon
4 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
When I applied for this position, I was working as an SDE-1 at Instahyre. I had been improving my DSA skills along with system design (both low-level and high-level) and was confident that I would be able to clear the interviews once I was shortlisted. I received the OA link 10 days after applying, and the overall process took about a month from application to receiving the offer letter.
Application story
I was working as an SDE-1 at Instahyre when I saw a post on LinkedIn mentioning that Swiggy was hiring for an ASDE role. I visited the Swiggy careers page and applied for the position without any referrals. I received the OA link within a few days, and the overall process took about one month to complete.
Why selected/rejected for the role?
Since I had been practicing DSA and system design for quite some time, all the rounds felt fairly straightforward to me. The interviewer was particularly impressed with my understanding of the architectures of the projects I had worked on and the system design question I solved during the interview process. I was also able to solve every DSA problem that was given to me during the process.
Preparation
Duration: 3 Months
Topics: DSA, System Design, OOPs, DBMS, Computer Networks
Tip
Tip

Tip 1: Practice as much DSA as possible, as it carries the most weightage in the initial rounds.

Tip 2: Dive deeper into OOPs concepts, as they act as stepping stones for solving low-level design problems.

Tip 3: Learn low-level design concepts and practice LLD problems.

Application process
Where: Linkedin
Eligibility: It required 0–1 years of experience for application, and the rest were part of the job description, including fluency in at least one language (Python, Java, or Go) and a strong command of problem-solving skills. (Salary Package: 10 LPA)
Resume Tip
Resume tip

Tip 1: Include strong projects in your resume that reflect the tech stack required for the position.

Tip 2: Mention any research papers you have published during college, as they add strong value to a fresher’s resume.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date7 Dec 2024
Coding problem3

The round included three DSA questions, of which two were easy to medium and one was medium to hard.

1. Koko Eating Bananas

Moderate
25m average time
70% success
0/80
Asked in companies
AmazonAtlassianTennr

A monkey is given ‘n’ piles of bananas, where the 'ith' pile has ‘a[i]’ bananas. An integer ‘h’ is also given, which denotes the time (in hours) in which all the bananas should be eaten.


Each hour, the monkey chooses a non-empty pile of bananas and eats ‘m’ bananas. If the pile contains less than ‘m’ bananas, then the monkey consumes all the bananas and won’t eat any more bananas in that hour.


Find the minimum number of bananas ‘m’ to eat per hour so that the monkey can eat all the bananas within ‘h’ hours.


Example:

Input: ‘n’ = 4, ‘a’ =  [3, 6, 2, 8] , ‘h’ = 7

Output: 3

Explanation: If ‘m’ = 3, then 
The time taken to empty the 1st pile is 1 hour.
The time taken to empty the 2nd pile is 2 hour.
The time taken to empty the 3rd pile is 1 hour.
The time taken to empty the 4th pile is 3 hour.
Therefore a total of 7 hours is taken. It can be shown that if the rate of eating bananas is reduced, they can’t be eaten in 7 hours.
Problem approach
  1. First, identify the largest pile size, as the eating speed cannot exceed this value.
  2. Set the search range with the minimum speed as 1 and the maximum speed as the largest pile size.
  3. Use binary search within this range to check possible speeds.
  4. At each step, take the middle value as the current speed and calculate how many hours it would take to finish all the piles at this speed.
  5. If the total hours are less than or equal to the allowed hours, this speed is a valid candidate, so try to find a smaller feasible speed by moving left.
  6. If the total hours exceed the allowed hours, the speed is too slow, so move right to try higher speeds.
  7. Continue this process until the range converges; the smallest valid speed found will be the answer.
Try solving now

2. Binary Subarrays With Sum

Moderate
0/80
Asked in company
Swiggy

You are given a binary array nums (containing only 0s and 1s) and an integer goal. Your task is to find the total number of non-empty subarrays whose elements sum up to the goal.


A subarray is a contiguous part of the array.


Problem approach
  1. Define a helper function to calculate the number of subarrays with a sum at most a given value.
  2. Initialize a sliding window with two pointers (left and right).
  3. Iterate through the array, expanding the right pointer and adding to the current sum.
  4. If the current sum exceeds the target, shrink the window from the left until it becomes valid.
  5. At each step, add the size of the current valid window to the count.
  6. To get the final answer, compute: atMost(goal) − atMost(goal − 1).
Try solving now

3. Bottom View Of Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
OYOMicrosoftAmazon

You are given a 'Binary Tree'.


Return the bottom view of the binary tree.


Note :
1. A node will be in the bottom-view if it is the bottom-most node at its horizontal distance from the root. 

2. The horizontal distance of the root from itself is 0. The horizontal distance of the right child of the root node is 1 and the horizontal distance of the left child of the root node is -1. 

3. The horizontal distance of node 'n' from root = horizontal distance of its parent from root + 1, if node 'n' is the right child of its parent.

4. The horizontal distance of node 'n' from root = horizontal distance of its parent from the root - 1, if node 'n' is the left child of its parent.

5. If more than one node is at the same horizontal distance and is the bottom-most node for that horizontal distance, including the one which is more towards the right.


Example:
Input: Consider the given Binary Tree:

alt text

Output: 4 2 6 3 7

Explanation:
Below is the bottom view of the binary tree.

alt text

1 is the root node, so its horizontal distance = 0.
Since 2 lies to the left of 0, its horizontal distance = 0-1= -1
3 lies to the right of 0, its horizontal distance = 0+1 = 1
Similarly, horizontal distance of 4 = Horizontal distance of 2 - 1= -1-1=-2
Horizontal distance of 5 = Horizontal distance of 2 + 1=  -1+1 = 0
Horizontal distance of 6 = 1-1 =0
Horizontal distance of 7 = 1+1 = 2

The bottom-most node at a horizontal distance of -2 is 4.
The bottom-most node at a horizontal distance of -1 is 2.
The bottom-most node at a horizontal distance of 0 is 5 and 6. However, 6 is more towards the right, so 6 is included.
The bottom-most node at a horizontal distance of 1 is 3.
The bottom-most node at a horizontal distance of 2 is 7.

Hence, the bottom view would be 4 2 6 3 7


Problem approach
  1. Each vertical line represents a unique vertical position.
  2. Nodes to the right of the center have positive vertical indices, increasing as we move further right.
  3. Nodes to the left have negative vertical indices, decreasing as we move further left.
Try solving now
02
Round
Easy
Assignment
Duration120 minutes
Interview date12 Dec 2024
Coding problem0
Web problem/projects1

1. Magical Game Arena Assignment in Java/Node.js

The Magical Arena is a turn-based battle game where two players engage in combat until one of them loses all their health points.

- Players have attributes such as health, strength, and attack.
- Players take turns attacking and defending using dice rolls.
- Damage calculation is based on attack and defense rolls.
- The game ends when one player's health reaches 0.

03
Round
Medium
Video Call
Duration70 minutes
Interview date6 Feb 2025
Coding problem1

The interview started with a self-introduction, where I introduced myself. Then, the interviewer presented a document and asked me to share my screen with it. The interviewer explained the complete problem statement and asked me to clarify any doubts I had.

He addressed all my questions, and the overall process was very smooth. The interviewer was supportive throughout the interview.

The interview took place from 2:00 PM to 3:10 PM, which was a convenient time for me.

I was asked to build a system to add a "Favorites" feature in an application such as Swiggy/Zomato.

1. System Design

I was asked to build a system to add a "Favourites" feature in an application such as Swiggy/Zomato. The main requirements of this feature were:

  1. The user should be able to add any restaurant to the favourites list.
  2. The user should be able to remove a restaurant from the list.
  3. Whenever the user opens the app, the favourite restaurants in their location/area should be shown first.
  4. The user should be able to share their favourite restaurants list.

The interviewer asked me to:

  1. List the essential design patterns I would use.
  2. Define the classes I would build.
  3. Design the APIs and write their code.
  4. Specify the request and response bodies.
  5. Identify edge cases in the feature and explain how I would handle them.
Problem approach

Tip 1: Always ensure that you interact with the interviewer during system design rounds so that both of you are on the same page regarding the feature being built.

Tip 2: Try to come up with a solution on your own first, and then proceed to implement it.

04
Round
Hard
Video Call
Duration70 minutes
Interview date11 Feb 2025
Coding problem1

This was the last technical round of the hiring process and was conducted by an Engineering Manager. It was scheduled in the evening, and the most impressive aspect of this round was the interviewer’s approach. After this round, I was convinced that I would definitely join Swiggy if I cleared the process, as the interviewer was the Engineering Manager of the team I would potentially be joining.

The interviewer did not ask generic DSA or system design questions. Instead, the questions were designed to test my foundational knowledge of the concepts I had mentioned in my resume. I genuinely enjoyed this round and learned a lot during the process, as the questions were engaging and not typical or repetitive.

1. Core Concepts

  • How does SSO work, and in which situations or applications is username-password–based authentication preferred over SSO?
  • Questions related to my projects and work experience.
  • Hashing and encryption.
  • Encryption algorithms and how they work.
  • Website security and how to prevent attacks.
  • Version control systems.
  • REST vs gRPC architecture and when to prefer each.
  • Database optimization techniques.

Managerial questions:

  1. What motivates you to join this role, given that you are already working as an SDE-1?
  2. What would be your goals after joining the team?

He then explained the kind of work I would be doing as part of his team if I got shortlisted.

Problem approach

Tip 1: Be transparent on your resume and avoid adding things you are not confident about.
Tip 2: Be straightforward with your answers; interviewers dislike unnecessary elaboration.
Tip 3: Prepare thoroughly on everything you have mentioned in your resume before the interview.
Tip 4: You can read Head First Design Patterns by O’Reilly for LLD and System Design Interview Vol. 1 & 2 by Alex Xu for HLD.

Here's your problem of the day

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

Skill covered: Programming

Which data structure is used to implement a DFS?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
9191 views
0 comments
0 upvotes
Analytics Consultant
3 rounds | 10 problems
Interviewed by ZS
1002 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3586 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2856 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Associate Software Engineer
3 rounds | 10 problems
Interviewed by Amdocs
2438 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 2 problems
Interviewed by Ernst & Young (EY)
2805 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 15 problems
Interviewed by Ernst & Young (EY)
2435 views
0 comments
0 upvotes