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

SDE - 1

JP Morgan
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I was not exceptionally good at coding at the start then I solved more than 400+ questions on code studio. Now I can crack most of the interviews I give.
Application story
I got a Referral from LinkedIn from a person currently working in this company. He is a very good person. He gives me a chance to prove myself.
Why selected/rejected for the role?
I was rejected because i have good projects in my resume and have a not that much good knowledge of the Data structure and Algorithm.
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

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

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more

Interview rounds

01
Round
Hard
Video Call
Duration60 mins
Interview date21 Oct 2022
Coding problem2

1. Amazing Strings

Easy
15m average time
85% success
0/40
Asked in companies
Urban Company (UrbanClap)D.E.ShawFlipkart limited

Shrey has just arrived in the city. When he entered the city, he was given two strings. Now, after arriving at his college, his professor gave him an extra string. To check his intelligence, his professor told him to check if the third string given to him has all the characters of the first and second strings in any order. Help Shrey before his professor scolds him. He has to answer “YES” if all characters are present else “NO”.

Example: ‘HELLO’ and ‘SHREY’ are two initial strings, and his professor gave him ’HLOHEELSRY’. So, here all the characters are present, so he has to say “YES”.

Note: The strings contain only uppercase Latin characters.

Problem approach

Shrey has just arrived in the city. When he entered the city, he was given two strings. Now, after arriving at his college, his professor gave him an extra string. To check his intelligence, his professor told him to check if the third string given to him has all the characters of the first and second strings in any order. Help Shrey before his professor scolds him. He has to answer “YES” if all characters are present else “NO”.

Try solving now

2. Chocolate Problem

Moderate
15m average time
85% success
0/80
Asked in companies
AdobePaytm (One97 Communications Limited)JP Morgan

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:

1. Each student gets at least one packet of chocolate.

2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

Example :

Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)

subsequence

And chocolates in each packet is : {8, 11, 7, 15, 2}

All possible way to distribute 5 packets of chocolates among 3 students are -

( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’ 
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’

Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
Problem approach

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:
1. Each student gets at least one packet of chocolate.
2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

Try solving now
02
Round
Easy
Video Call
Duration60 mins
Interview date21 Oct 2022
Coding problem2

1. All Prime Numbers less than or equal to N

Moderate
10m average time
90% success
0/80
Asked in companies
OptumAdobeTata Consultancy Services (TCS)

You are given a positive integer 'N'. Your task is to return all the prime numbers less than or equal to the 'N'.

Note:

1) A prime number is a number that has only two factors: 1 and the number itself.

2) 1 is not a prime number.
Problem approach

Given an integer N, print all the prime numbers that lie in the range 2 to N (both inclusive).
Print the prime numbers in different lines.

Try solving now

2. Tree Traversals

Easy
15m average time
85% success
0/40
Asked in companies
Wells FargoCognizantBig Basket

You have been given a Binary Tree of 'N'

nodes, where the nodes have integer values.


Your task is to return the ln-Order, Pre-Order, and Post-Order traversals of the given binary tree.


For example :
For the given binary tree:

Binary - Tree1

The Inorder traversal will be [5, 3, 2, 1, 7, 4, 6].
The Preorder traversal will be [1, 3, 5, 2, 4, 7, 6].
The Postorder traversal will be [5, 2, 3, 7, 6, 4, 1].
Problem approach

You have been given a Binary Tree of 'N' nodes, where the nodes have integer values. Your task is to find the ln-Order, Pre-Order, and Post-Order traversals of the given binary tree.

Try solving now

Here's your problem of the day

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

Skill covered: Programming

To make an AI less repetitive in a long paragraph, you should increase:

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by JP Morgan
0 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by JP Morgan
1058 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by JP Morgan
3132 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by JP Morgan
3168 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114453 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57719 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34914 views
7 comments
0 upvotes