Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
JP Morgan interview experience Real time questions & tips from candidates to crack your interview

Machine learning engineer

JP Morgan
upvote
share-icon
5 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 Months
Topics: Probability and Statistics, Dynamic programming, Greedy Algorithm, Arrays, Strings, Trees, Heap
Tip
Tip

Tip 1 : Do Solve Probability questions on Expectancy, Conditional Probability, Bayes theorem and basic 12th level.
Tip 2 : Prepare your Introduction and Be very concise as interviews are of maximum 30 mins each
Tip 3 : Be very communicative and keep trying each question given till end. Never give up!

Application process
Where: Campus
Eligibility: Above 7 CGPA, No criteria, Need two development projects on Resume
Resume Tip
Resume tip

Tip 1 : Do include Projects with Live link in resume
Tip 2 : Do Choose simple Format of Word, Don't include to much designing

Interview rounds

01
Round
Hard
Online Coding Interview
Duration60 Minutes
Interview date12 Aug 2021
Coding problem2

Timings: Early morning 7am (60 mins )
Subsection 1 (30 mins): MCQ round having 30 questions of 11th and 12th Math (complex numbers, trigonometry, calculas), Probability (Expectancy, bayes theorem, other probability question), Coding (Input/Output Question, Time complexity, Stack Push and Pop, Prefix, Postfix).
Subsection 2 (30 mins): 2 Coding Question 1 easy level (Find max in array), other was medium level (Find all the elements in tree which are at same level, where level is depth of smallest path from root to leaf)

Questions were different for each candidate

1. Given an array find the maximum element in array.

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

You are given an array of N elements. This array represents the digits of a number. In an operation, you can swap the value at any two indices. Your task is to find the maximum number by using operation at most once.

For Example :

Input array [1,3,2,7] so basically this array represents the number 1327.
All the possible combinations are :
1. [3 1 2 7] get by swapping indices 1 and 2.
2. [2 3 1 7] get by swapping indices 1 and 3.
3. [7 3 2 1] get by swapping indices 1 and 4.
4. [1 2 3 7] get by swapping indices  2 and 3.
5. [1 7 2 3] get by swapping indices 2 and 4.
6. [1 3 7 2] get by swapping indices 3 and 4.
Out of all the possible combinations, 3 give the maximum number as 7321, so we will return [7 3 2 1].

Note :

The input may have 0 before the most significant digit. e.g. [0,3,5,7] is a valid input and this represents number 357.
Try solving now

2. Finding Paths

Moderate
25m average time
75% success
0/80
Asked in companies
JP MorganAmazonSamsung R&D Institute

Kevin has written some integers on a paper. He then selects some integers and draws a line between them. Fortunately, his diagram represents a binary tree. Today, his friend challenged him to find the paths that start from root and end at the leaf in his diagram whose sum is exactly equal to the number ‘K’. But, Kevin has another important piece of work and so, he appoints you to do his task.

All you have to do is to find the paths in his diagram whose sum is exactly equal to the number ‘K’.

For Example:

Example

Consider the above binary tree. If ‘K’ is 15 then the required paths are [5, 6, 4] and [5, 15, -5].
Try solving now
02
Round
Medium
Video Call
Duration30 minutes
Interview date12 Aug 2021
Coding problem2

Interviewer greeted me and told this round is only on Probability.(This was scheduled same day at 3pm)
He asked Following Probability questions:
Q1: What is Random variable?
Q2: What is Sample space?
Q3: What is Conditional Probability? followed by a Numerical on it.
Q4: What is a Normal Distribution?
Q5: What is Bayes theorem? followed by a numerical on it.
Q6: probability of car accident in one hour is 1/4. What is the probability of accident in half hour?
Q7: Two die are thrown, what is the probability of getting multiple of 3. 
Q8: There is 10 Black socks in drawer, 10 white socks. What is the minimum number of socks we need to pick out such that we get a pair?

1. Aptitude Question

probability of car accident in one hour is 1/4. What is the probability of accident in half hour?

2. Aptitude Question

There is 10 Black socks in drawer, 10 white socks. What is the minimum number of socks we need to pick out such that we get a pair?

Problem approach

Tip 1:
Tip 2:
Tip 3:

03
Round
Medium
Video Call
Duration30 minutes
Interview date12 Aug 2021
Coding problem1

Interviewer greeted me and told this round is only on Basic DSA.(This was scheduled same day at 3:30pm)
He asked Following questions:
Q1: Introduction and Explain your resume?
Q2: What if we have one class (which has array functionality) and other class (stack) which we will inherit from array class what could possibly go wrong here?
Q3: What is Static data member in Classes?
Q4: What is Static member function in Classes? Can static member functions call normal data member of classes?
Q5: you are given a 2D grid, each index has some value associated with it. From Bottom right cornor you need to find a path till Top left cornor where you can get maximum sum of values from index occuring on the path, You can go in Up direction, Left direction or diagonal up-left direction? 

I was asked for approach (No coding was done on compiler)

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

You are given an ‘M*N’ Matrix, You need to print all possible paths from its top left corner to the bottom right corner if given that you can either move right i.e from (i,j) to (i,j+1) or down i.e from (i, j) to (i+1, j).

For Example :
1 2 3
4 5 6

For the above 2*3 matrix , possible paths are (1 2 3 6) , (1 2 5 6) , (1 4 5 6).
Note :
You can return the paths in any order.
Try solving now
04
Round
Easy
Video Call
Duration15 minutes
Interview date12 Aug 2021
Coding problem2

This round happened around 5pm in evening, i got the call from the interviewer to join Zoom call immediately. In this round (it was kind of rapid fire round on DSA,)
Following questions were asked:
Q1: Introduce yourself and explain your resume.
Q2: What is your favorite data structure and why? I said it is Deque, as it is can be helpful in many questions
Q3: Explain what are segment trees. Also give a question were we can use them.
Q4: What are tries, and give one application of tries.
Q5: Given one array you need to give approach to find out all the permutation of the elements in it. (I gave recursive approach)
Q6: Given the same array and value k, you need to tell if sum of subset can be equal to k. (This question is modification of 0/1 Knapsack. I explained the recursive approach)

Interviewer told me to wait for last HR round (I was on cloud 9 after listening to this as it was elimination round)

1. Find Permutation

Moderate
25m average time
65% success
0/80
Asked in companies
FacebookOlaJP Morgan

You are given an integer ‘N’. You need to find an array of size 2*N that satisfies the following two conditions.

1. All numbers from 1 to N should appear exactly twice in the array.

2. The distance between the second occurrence and the first occurrence of any number should exactly be equal to the value of that number.

The distance between two numbers at indices ‘i’ and ‘j’ is defined as (j-i-1) where i < j.

If no such array exists, then you should return an empty array.

For example :
For N = 3 one valid array is [3,1,2,1,3,2].
Try solving now

2. Subset Sum Equal To K

Moderate
30m average time
65% success
0/80
Asked in companies
Paytm (One97 Communications Limited)SalesforceAtlassian

You are given an array/list ‘ARR’ of ‘N’ positive integers and an integer ‘K’. Your task is to check if there exists a subset in ‘ARR’ with a sum equal to ‘K’.

Note: Return true if there exists a subset with sum equal to ‘K’. Otherwise, return false.

For Example :
If ‘ARR’ is {1,2,3,4} and ‘K’ = 4, then there exists 2 subsets with sum = 4. These are {1,3} and {4}. Hence, return true.
Try solving now
05
Round
Easy
Video Call
Duration20 Minutes
Interview date12 Aug 2021
Coding problem1

This round happened around 6:30pm in evening, i got the call from the interviewer to join Zoom call immediately. It was HR+(Probability mix round).
He asked me following questions:
Q1: Introduce and explain your resume.
As i was unable to solve 2 probability question in Round 2. The interviewer immediately asked me 2 probability questions back to back.
Q2: What is bayes theorem and a numerical on it.
Q3: If there is a frog which can go one step forward with probability 3/4. and one step backward with 1/4. What is expectancy to reach 7 steps forward.

I was unable to solve the last probability ques. Was on right track almost in end of interview.
2/18 students were selected for intern JPMC(Quant Research @ 1.5Lakhs stipend)

1. Aptitude Question

If there is a frog which can go one step forward with probability 3/4. and one step backward with 1/4. What is expectancy to reach 7 steps forward.

Do you know this?

TikTok uses _________ to recursively display trending videos ensuring your feed is filled with new content.

Start a Discussion
Similar interview experiences
company logo
R&D Intern
4 rounds | 4 problems
Interviewed by JP Morgan
750 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by JP Morgan
937 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
611 views
0 comments
0 upvotes