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

SDE - 1

Swiggy private limited
upvote
share-icon
4 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 Months
Topics: DSA, Networking, Operating Systems, DBMS, Spring Java
Tip
Tip

Tip 1 : Practice Trees, Graphs, DP
Tip 2 : Be sure about your projects

Application process
Where: Referral
Eligibility: NA
Resume Tip
Resume tip

Tip 1 : Be genuine about your resume
Tip 2 : Have at least two projects on resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date18 Mar 2021
Coding problem3

1 easy and 2 medium-hard DSA problems to solve

1. Hurdle Game

Easy
10m average time
90% success
0/40
Asked in companies
Goldman SachsMedia.netGartner

Once Kevin is playing a hurdle game in which he has to jump some hurdles to clear a particular level. Each level ‘i’ has ‘i’ hurdles (for example, level 6 has 6 hurdles).

You are provided with the total number of hurdles that Kevin has jumped, you have to tell how many levels he has cleared.

Note :

Kevin has played this game once. He can only reach the level ‘i’ if and only if he has already cleared the level (‘i’ - 1).
Try solving now

2. N Queens

Hard
55m average time
35% success
0/120
Asked in companies
Thought WorksTwitterAdobe

You are given an integer 'N'. For a given 'N' x 'N' chessboard, find a way to place 'N' queens such that no queen can attack any other queen on the chessboard.

A queen can be killed when it lies in the same row, or same column, or the same diagonal of any of the other queens. You have to print all such configurations.

Try solving now

3. Count Ways To Travel Triangular Pyramid

Moderate
20m average time
80% success
0/80
Asked in companies
MicrosoftOYOMakeMyTrip

Bob has been given a triangular pyramid with its vertices marked as ‘O’, ‘X’, ‘Y’ and ‘Z’ and provided with another integer ‘N’. In a single step, Bob can go to any adjacent vertices. Bob will always start from ‘O’ and has to return to ‘O’ after making exactly ‘N’ steps.

Example

Your task is to find out the number of ways he can take to complete his journey.

Note :

As the answer can be very large, return the answer by taking modulo with 1000000007.

For example :

If ‘N’=1 
So in 1 step we can reach either to ‘X’ , ‘Y’ or ‘Z’ and can not travel back to ‘O’.
Thus there are 0 ways.

If ‘N’ =2
So there are total three ways :
(i)  O->X->O
(ii) O->Y->O
(iii) O->Z->O

If ‘N’ = 3
So there are total 6 ways :
(i) O->X->Y->O
(ii) O->X->Z->O
(iii) O->Y->X->O
(iv) O->Y->Z->O
(v) O->Z->X->O
(vi) O->Z->Y->O
Try solving now
02
Round
Medium
Face to Face
Duration60 Minutes
Interview date25 Mar 2021
Coding problem2

2 DSA problems and computer subject questions

1. Binary strings with no consecutive 1s.

Moderate
25m average time
65% success
0/80
Asked in companies
AmazonWells FargoGoogle inc

You have been given an integer 'N'. Your task is to generate and return all binary strings of length 'N' such that there are no consecutive 1's in the string.


A binary string is that string which contains only ‘0’ and ‘1’.


For Example:
Let ‘N'=3, hence the length of the binary string would be 3. 

We can have the following binary strings with no consecutive 1s:
000 001 010 100 101 
Try solving now

2. Shuffle Two Strings

Hard
50m average time
50% success
0/120
Asked in companies
LinkedInShareChatCIS - Cyber Infrastructure

You are given three strings “A”, “B” and “C”. Your task is to check whether “C” is formed by an interleaving of A and B. C is said to be interleaving “A” and “B”, if the length of “C” is equal to the sum of the length of A and length of B, all the characters of “A” and “B” are present in “C”, and the order of all these characters remains the same in all three strings.

For Example:
If A = “aab”, B = “abc”, C = “aaabbc”
Here C is an interleaving string of A and B. Because C contains all the characters of A and B and the order of all these characters is also the same in all three strings.

interleaving

If A = “abc”, B = “def”, C = “abcdefg”
Here C is not an interleaving string of A and B as neither A nor B contains the character ‘g’.
Try solving now
03
Round
Easy
Face to Face
Duration60 Minutes
Interview date25 Mar 2021
Coding problem3

DSA round

1. Ninja And Geometry

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

Ninja has been given 2 points ‘A’ and ’B’ that corresponds to the line ‘AB’ and ‘P’, ’Q’ that corresponds to line ‘PQ’ on a 2D plane. Ninja wants to find the intersection point of the ‘AB’ and ‘PQ’ lines up to 6 decimal places. If there is no such intersection point print -1.000000 -1.000000.

Note:

1. You do not need to fix the output up to 6 decimal places. it has already been taken care of. Just return the output in the data type mentioned in the function. 
2. Lines ‘AB’ and ‘PQ’ are two different lines. 

For Example: For A(0, 3), B(3, 0) and P(0, 0), Q(5, 5) the point of intersection of line ‘AB’ and ‘PQ’ is (1.500000, 1.500000). As shown below:

alt

As Ninja is weak in Geometry, can you help him to find the intersection of these two lines?

Try solving now

2. Detect Cycle in a Directed Graph

Easy
0/40
Asked in companies
PayPalShareChatJUSPAY

Given a directed graph, check whether the graph contains a cycle or not. Your function should return true if the given graph contains at least one cycle, else return false.

Problem approach

1. Create the graph using the given number of edges and vertices.
2. Create a recursive function that initializes the current index or vertex, visited, and recursion stack.
3. Mark the current node as visited and also mark the index in the recursion stack.
4. Find all the vertices which are not visited and are adjacent to the current node. Recursively call the function for those vertices, If the recursive function returns true, return true.
5. If the adjacent vertices are already marked in the recursion stack then return true.
6. Create a wrapper class, that calls the recursive function for all the vertices, and if any function returns true return true. Else if for all vertices the function returns false return false.

Try solving now

3. Technical Questions

Started with spring beans, functional dependencies and asked how will check dependencies are valid or not. When I said they must be in the form of a directed acyclic graph. Then he asked me to check whether there exists a cycle or not.

04
Round
Easy
Face to Face
Duration30 Minutes
Interview date25 Mar 2021
Coding problem1

It is a managerial round

1. Networking Question

How does URL work and What is a load balancer.

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 - 1
3 rounds | 4 problems
Interviewed by Swiggy private limited
6858 views
1 comments
0 upvotes
SDE - 1
4 rounds | 7 problems
Interviewed by Swiggy private limited
2002 views
1 comments
0 upvotes
SDE - 1
3 rounds | 10 problems
Interviewed by Swiggy private limited
1529 views
0 comments
0 upvotes
SDE - 1
3 rounds | 4 problems
Interviewed by Swiggy private limited
1945 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes