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

Quantitative Research

JP Morgan
upvote
share-icon
3 rounds | 12 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: Data Structures, Algorithms, OOPS, DBMS, Probability, Statistics
Tip
Tip

Tip 1 : Having good mathematical skills and a good grasp of Probability will help you a lot.
Tip 2 : Have all your basics cleared of OOPS and data structures.
Tip 3 : Practice coding questions regularly to have good coding skills.
Tip 4 : Have at least one good project where you used Machine Learning or played with data.
Tip 5 : Solve a lot of puzzles 

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at least one good project where you used Machine Learning or played with data.
Tip 2 : You must know everything thoroughly that you've written on your resume.
Tip 3 : Keep it simple, clean, and readable.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date1 Aug 2020
Coding problem2

This was an MCQ + Coding round

18 questions of Logical Reasoning
5 questions of Mathematics
7 questions of Subjects
2 coding questions

1. Minimum travel Cost

Moderate
40m average time
65% success
0/80
Asked in companies
GoogleSamsungJP Morgan

Ninjaland is a country having 'N' states numbered from 1 to 'N'. These 'N' states are connected by 'M' bidirectional roads. Each road connects to different states and has some cost to travel from one state to another. Now, the chief wants you to select 'N' - 1 roads in such a way that the tourist bus can travel to every state at least once at minimum 'COST'.

For example :
Consider a country having 4 states numbered from 1 to 4. These 4 states are connected by 5 bidirectional roads given as :
1 --- 2 with cost = 8
2 --- 3 with cost = 6
3 --- 4 with cost = 5
1 --- 4 with cost = 2
1 --- 3 with cost = 4

The map of the country can be represented as:

Now, the best way to choose 3 roads is:

The cost of travelling from any state to all other states is  2 + 4 + 6 i.e. 12.
Problem approach

Used prims minimum spanning tree algorithm.

Try solving now

2. Shortest path in an unweighted graph

Moderate
25m average time
70% success
0/80
Asked in companies
Morgan StanleyBNY MellonWalmart

The city of Ninjaland is analogous to the unweighted graph. The city has ‘N’ houses numbered from 1 to ‘N’ respectively and are connected by M bidirectional roads. If a road is connecting two houses ‘X’ and ‘Y’ which means you can go from ‘X’ to ‘Y’ or ‘Y’ to ‘X’. It is guaranteed that you can reach any house from any other house via some combination of roads. Two houses are directly connected by at max one road.

A path between house ‘S’ to house ‘T’ is defined as a sequence of vertices from ‘S’ to ‘T’. Where starting house is ‘S’ and the ending house is ‘T’ and there is a road connecting two consecutive houses. Basically, the path looks like this: (S , h1 , h2 , h3 , ... T). you have to find the shortest path from ‘S’ to ‘T’.

For example
In the below map of Ninjaland let say you want to go from S=1 to T=8, the shortest path is (1, 3, 8). You can also go from S=1 to T=8  via (1, 2, 5, 8)  or (1, 4, 6, 7, 8) but these paths are not shortest.

altImage

Problem approach

Used Floyd Warshall algorithm.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date5 Oct 2020
Coding problem6

The interviewer was kind, chill, and helping. The interview was on Zoom.

1. Probability-Mathematics

Throw a dice, your score will the number that appears on the topmost face of the dice. Find the expected score. Then the question was extended to two throws, either you can keep the number appeared in the first throw or discard that and go for another throw. Then again the question was extended to three and 'n' throws.

Problem approach

Good knowledge of probability is needed

2. Puzzle

There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find out their relative speed. At no point you can find out the actual speed of the horse in a race. Find out how many races are required to get the top 3 horses.

Problem approach

Try to eliminate as many horses as you can.

3. Aptitude Question

Find the number which when divided by 8, leaves remainder 7, when divided by 7, leaves remainder 6, when divided by 5, leaves remainder 4........ when divided by 2, leaves remainder 1.

Problem approach

Take LCM of 8, 7, 6, 5, 4, 3, and 2. Then subtract 1 from it.

4. Optimal Strategy for a Game

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

You and your friend Ninjax are playing a game of coins. Ninjax place the 'N' number of coins in a straight line.

The rule of the game is as follows:

1. Each coin has a value associated with it.

2. It’s a two-player game played against an opponent with alternating turns. 

3. At each turn, the player picks either the first or the last coin from the line and permanently removes it.

4. The value associated with the coin picked by the player adds up to the total amount the player wins. 

Ninjax is a good friend of yours and asks you to start first.

Your task is to find the maximum amount you can definitely win at the end of this game.

Note:

'N' is always even number.

Ninjax is as smart as you, so he will play so as to maximize the amount he wins.
Example 1:
Let the values associated with four coins be: [9, 5, 21, 7] 

Let’s say that initially, you pick 9 and Ninjax picks 7.
Then, you pick 21 and Ninjax picks 5. 
So, you win a total amount of (9+21), i.e. 30.

In case you would have picked up 7 initially and Ninjax would have picked 21 (as he plays optimally). 
Then, you would pick 9 and Ninjax would choose 5. So, you win a total amount of (7+9), i.e. 16, which is not the maximum you can obtain.

Thus, the maximum amount you can win is 30.
Example 2:
Let the values associated with four coins be: [20, 50, 5, 10] 

Let’s say that initially, you pick 10 and Ninjax picks 20.
Then, you pick 50 and Ninjax picks 5. 
So, you win a total amount of (10+50), i.e. 60.

In case you would have picked up 20 initially and Ninjax would have picked 50 (as he plays optimally). 
Then, you would pick 10 and Ninjax would choose 5. So, you win a total amount of (20+10), i.e. 30, which is not the maximum you can obtain.

Thus, the maximum amount you can win is 60.
Try solving now

5. Chocolate Bar

Hard
45m average time
50% success
0/120
Asked in companies
OlaJP Morgan

You are given a chocolate bar in the form of a grid consisting of N x M pieces of chocolate. Your task is to take out exactly ‘K’ pieces of chocolate by cutting the chocolate bar either horizontally or vertically. This operation will cost you the square of break length.

For example: If you have a chocolate bar of size 3x4, then you can cut horizontally and get two bars of the chocolate of size 1x4 and 2x4. The cost of this cut will be 4^2 = 16 or you can cut vertically and get two bars of the chocolate of size 3x1 and 3x3. The cost of this cut will be 3^2 = 9.

You are given ‘Q’ queries and for each query you need to find the minimum cost such that after all the cutting operations, exactly ‘K’ pieces are obtained from a chocolate of dimension N x M.

Note:

1.You can discard the remaining N x M - K pieces.
2.You do not need to print anything. It has already been taken care of by our driver code. Just implement the given function and return the minimum cost of cutting the chocolate bar to get exactly ‘K’ pieces of chocolate for each query.
Problem approach

It depends if the value of n and m is odd or even.

Try solving now

6. OOPS

Five questions on OOPS were asked :-

1. What is Smart Pointer?
2. Some basic questions involving bit manipulation.
3. What is Virtual function?
4. What is Abstract Class?
5. Other standard simple questions of OOPS.

Problem approach

Good knowledge of OOPS will help you get through this kind of questions.

03
Round
Easy
Video Call
Duration60 minutes
Interview date5 Aug 2020
Coding problem4

The interviewer was kind, chill, and helpful. The interview was on Zoom.

1. Project Discussion

Discussion on Machine Learning Projects followed by a thorough discussion on Regression and other models. Discussion on deciding the model for any dataset and related factors.

2. Puzzle

Given two hourglass of 4 minutes and 7 minutes, the task is to measure 9 minutes.
 

Problem approach

Step 1 : Start both hourglasses at the same time.

Step 2 : At 4 minutes 4 minutes hourglass runs out and flip it. 7 minutes hourglass is left with 3 minutes.

Step 3 : At 7 minutes 4 minutes hourglass is left with 1 minute. 7 minutes hourglass runs out and flip it.

Step 4 : At 8 minutes: 4 minutes hourglass runs out and 7 is filled with 6 minutes and 1 minute on the other side. Flip it as the sand is left with 1 minute.

Step 5 : At 9 minutes: 7 minutes hourglass becomes empty from above side.

 

3. Counting Pairs

Moderate
35m average time
65% success
0/80
Asked in companies
Thought WorksAdobeGroww

You are given a positive integer N and an equation 1/X + 1/Y = 1/N

You need to determine the count of all possible positive integral solutions (X, Y) for the above equation.

Note:

1. X and Y should be greater than 0.
2. (X, Y) and (Y, X) are considered different solutions if X is not equal to Y, i.e. (X, Y) and (Y, X) will not be distinct if X=Y.
Try solving now

4. Aptitude Question

There are 2 ants sitting on diagonally opposite vertices of the same face of a cube. They can move in any direction and reach another vertex in one unit of time. They'll move indefinitely until they collide and die. Find the expected life time of ants.

Problem approach

Tip 1 : Observation and imagination.


 

Here's your problem of the day

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

Skill covered: Programming

What does the SQL function NOW() return?

Choose another skill to practice
Similar interview experiences
company logo
R&D Intern
4 rounds | 4 problems
Interviewed by JP Morgan
892 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by JP Morgan
1115 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by JP Morgan
0 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 14 problems
Interviewed by JP Morgan
799 views
0 comments
0 upvotes