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

SDE - Intern

MagicPIN
upvote
share-icon
4 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming, backend technologies
Tip
Tip

Tip 1 : Basic of DSA should be clear, think out loud
Tip 2 : Dry the code
Tip 3 : Cover all test cases

Application process
Where: Campus
Eligibility: 8+ CGPA
Resume Tip
Resume tip

Tip 1: Mention at least 2 project
Tip 2: Do add too many extracurricular activities

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 mins
Interview date13 Sep 2022
Coding problem2

It was at 12 pm and a proctored exam.

1. Trapping Rain Water

Moderate
15m average time
80% success
0/80
Asked in companies
RazorpayMorgan StanleyUber

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Try solving now

2. City And Bridges

Moderate
50m average time
60% success
0/80
Asked in companies
LinkedInPhonePeDunzo

Ninja got a map in his hand with ‘N’ cities numbered 0 to ‘N’, connected with bridges. He asks his sister to delete some cities from the map.

He will ask his sister a ‘Q’ query. Each query is denoted by an integer ‘X’, meaning that he will delete the city ‘X’. He wants to see if the new map obtained after deleting the city node will have more connected components than the previous map.

He wants to build the program for the queries given by his sister for the above condition.

Ninja knows that you are a very good programmer and can help him in writing the code for the above. Help Ninja!

Note:

A connected component in the map is the maximum subset of cities that are connected i.e we can go from one city to any other in that subset.
Try solving now
02
Round
Easy
Video Call
Duration45 mins
Interview date14 Sep 2022
Coding problem2

it was at 11 am, with video on

1. Snake and Ladder

Moderate
30m average time
60% success
0/80
Asked in companies
OlaDunzoIntuit

You have been given a Snake and Ladder Board with 'N' rows and 'N' columns with the numbers written from 1 to (N*N) starting from the bottom left of the board, and alternating direction each row.

For example

For a (6 x 6) board, the numbers are written as follows:

6*6 Board

You start from square 1 of the board (which is always in the last row and first column). On each square say 'X', you can throw a dice which can have six outcomes and you have total control over the outcome of dice throw and you want to find out the minimum number of throws required to reach the last cell.
Some of the squares contain Snakes and Ladders, and these are possibilities of a throw at square 'X':
You choose a destination square 'S' with number 'X+1', 'X+2', 'X+3', 'X+4', 'X+5', or 'X+6', provided this number is <= N*N.
If 'S' has a snake or ladder, you move to the destination of that snake or ladder.  Otherwise, you move to S.
A board square on row 'i' and column 'j' has a "Snake or Ladder" if board[i][j] != -1. The destination of that snake or ladder is board[i][j].
Note :
You can only take a snake or ladder at most once per move: if the destination to a snake or ladder is the start of another snake or ladder, you do not continue moving - you have to ignore the snake or ladder present on that square.

For example, if the board is:
-1 1 -1
-1 -1 9
-1 4 -1
Let's say on the first move your destination square is 2  [at row 2, column 1], then you finish your first move at 4 [at row 1, column 2] because you do not continue moving to 9 [at row 0, column 0] by taking the ladder from 4.

A square can also have a Snake or Ladder which will end at the same cell.
For example, if the board is:
-1 3 -1
-1 5 -1
-1 -1 9
Here we can see Snake/Ladder on square 5 [at row 1, column 1] will end on the same square 5.
Try solving now

2. Job Sequencing Problem

Moderate
30m average time
70% success
0/80
Asked in companies
OracleCIS - Cyber InfrastructureExpedia Group

You are given a 'Nx3' 2-D array 'Jobs' describing 'N' jobs where 'Jobs[i][0]' denotes the id of 'i-th' job, 'Jobs[i][1]' denotes the deadline of 'i-th' job, and 'Jobs[i][2]' denotes the profit associated with 'i-th job'.


You will make a particular profit if you complete the job within the deadline associated with it. Each job takes 1 unit of time to be completed, and you can schedule only one job at a particular time.


Return the number of jobs to be done to get maximum profit.


Note :
If a particular job has a deadline 'x', it means that it needs to be completed at any time before 'x'.

Assume that the start time is 0.


For Example :
'N' = 3, Jobs = [[1, 1, 30], [2, 3, 40], [3, 2, 10]].

All the jobs have different deadlines. So we can complete all the jobs.

At time 0-1, Job 1 will complete.
At time 1-2, Job 3 will complete.
At time 2-3, Job 2 will complete.

So our answer is [3 80].
Try solving now
03
Round
Easy
Video Call
Duration90 mins
Interview date14 Sep 2022
Coding problem4

it was 5 pm, with video on

1. DBMS

Design DBMS for campaigns and notification system for magicpin

Problem approach

Tip 1: Write and visualise everything
Tip 2: Keep discussing

2. Find if Path Exists in Graph

Easy
45m average time
75% success
0/40
Asked in company
MagicPIN

You are given an undirected graph consisting of ‘N’ nodes from 0 to ‘N’ - 1. You are given a list ‘EDGES’ of size ‘M’, consisting of all the edges of this undirected graph, and two nodes ‘SOURCE’ and ‘DESTINATION’ of this graph. Determine whether there exists a path from node ‘SOURCE’ to node ‘DESTINATION’. In other words, check whether there exists a path from node ‘SOURCE’ to node ‘DESTINATION’ by moving along the edges of the graph.

Note:
The graph has no self-edges, no parallel edges.
The graph may not be connected.
For Example,
If ‘N’ = 7, ‘M’ = 5, ‘SOURCE’ = 1, ‘DESTINATION’ = 5, EDGES = [ [2, 4], [2, 5],[3, 5],[3, 6],[4, 5] ].

Here, you can see that the graph is not connected and there is no way we can reach node 5 from node 1 as they both are in different connected components. Hence, the output is “No”.
Try solving now

3. Puzzle

There are 3 jars, namely, A, B, C. All of them are mislabeled. Following are the labels of each of the jars:

A: Candies
B: Sweets
C: Candies and Sweets (mixed in a random proportion)
You can put your hand in a jar and pick only one eatable at a time. Tell the minimum number of eatable(s) that has/have to be picked in order to label the jars correctly.

4. Puzzle

100 people standing in a circle in an order 1 to 100. No. 1 has a sword. He kills the next person (i.e. No. 2) and gives the sword to the next (i.e. No. 3). All people do the same until only 1 survives. Which number survives at the last? 
There are 100 people starting from 1 to 100.

04
Round
Easy
HR Round
Duration30 mins
Interview date16 Sep 2021
Coding problem1

It was 2 pm, with video on

1. Basic HR Questions

1. why magicpin
2. tell me about yourself
3. how HTTP requests are routed
4. diff between post,get and put calls
5. internship and projects

Problem approach

Tip 1: Talk openly
Tip 2: practice such questions while preparing 

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
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
Analytics Consultant
3 rounds | 10 problems
Interviewed by ZS
907 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2581 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15481 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15339 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes