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

Summer analyst

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

Interview preparation journey

expand-icon
Journey
My life has had many ups and downs, but I somewhat managed to get admission to the college where I took computer science as a subject. Then my coding journey started from here.
Application story
This company visited to my college for the placement session where i applied for this company .
Why selected/rejected for the role?
I was rejected because i am not able to answer all the questions correctly and precise. .
Preparation
Duration: 4 Months
Topics: OOPS, core java, DBMS, SQL & PL/SQL, Data Structures and Algorithms, UI (HTML, JS), SDLC, Java 8 concepts, UML diagrams, Collections, Multithreading, Exception Handling, Hashing, Recursion problems.
Tip
Tip

Tip 1 : Practice more problem solving questions
Tip 2 : understand the comcepts in depth
Tip 3 : try to work on onw or two handson project to get more experience in that stack.

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

Tip 1 : Add some good projects on resume
Tip 2 : put things which you know well and not technologies which you don't know.

Interview rounds

01
Round
Medium
Video Call
Duration60 Minutes
Interview date18 Nov 2022
Coding problem2

1. Merge Two Sorted Linked Lists

Moderate
15m average time
80% success
0/80
Asked in companies
AmazonCIS - Cyber InfrastructureUber

You are given two sorted linked lists. You have to merge them to produce a combined sorted linked list. You need to return the head of the final linked list.

Note:

The given linked lists may or may not be null.

For example:

If the first list is: 1 -> 4 -> 5 -> NULL and the second list is: 2 -> 3 -> 5 -> NULL

The final list would be: 1 -> 2 -> 3 -> 4 -> 5 -> 5 -> NULL
Problem approach

Approach 1 (Recursive) :

1) Compare the head of both linked lists.
2) Find the smaller node among the two head nodes. The current element will be the smaller node among two head nodes.
3) The rest elements of both lists will appear after that.
4) Now run a recursive function with parameters, the next node of the smaller element, and the other head.
5) The recursive function will return the next smaller element linked with rest of the sorted element. Now point the next of current element to that, i.e curr_ele->next=recursivefunction()
6) Handle some corner cases. 
6.1) If both the heads are NULL return null.
6.2) If one head is null return the other.

TC : O(N), where N=length of the Linked List
SC : O(N)


Approach 2 (Iterative) :

1) Traverse the list from start to end.
2) If the head node of second list lies in between two nodes of the first list, insert it there and make the next node of second list the head. Continue this until there is no node left in both lists, i.e. both the lists are traversed.
3) If the first list has reached end while traversing, point the next node to the head of second list.

Note: Compare both the lists where the list with a smaller head value is the first list.

TC : O(N), where N=length of the Linked List
SC : O(1)

Try solving now

2. Sub Sort

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

You are given an integer array ‘ARR’. You have to find the length of the shortest contiguous subarray such that, if you sort this subarray in ascending order, then the whole array will be sorted in ascending order.

An array 'C' is a subarray of array 'D' if it can be obtained by deletion of several elements(possibly zero) from the beginning and the end from array 'D'.

Example:

Let’s say we have an array 'ARR' {10, 12, 20, 30, 25, 40, 32, 31, 35, 50, 60}. Then we have to find the subarray {30 , 25 , 40 , 32 , 31 , 35} and print its length = 5 as our output. Because, when we sort this subarray the whole array will be sorted.
Problem approach

You are given an integer array ‘ARR’. You have to find the length of the shortest contiguous subarray such that, if you sort this subarray in ascending order, then the whole array will be sorted in ascending order.
An array 'C' is a subarray of array 'D' if it can be obtained by deletion of several elements(possibly zero) from the beginning and the end from array 'D'.

Try solving now
02
Round
Easy
Video Call
Duration60 Minutes
Interview date18 Nov 2022
Coding problem3

1. OOPS Question

What are Virtual Destructors in C++?

2. Swap Adjacent Bit Pairs

Easy
10m average time
90% success
0/40
Asked in companies
AmazonAdobeJP Morgan

You are given an integer 'N'. Your task is to find the number formed after swapping each even bit of 'N' in its binary representation with its adjacent bit on the right, assuming that the least significant bit is an odd bit.

For example :

Consider the integer N = 45 whose binary representation is 101101. The resulting number formed after swapping each even bit with its adjacent bit to the right will be 30 (011110) in this case.
Problem approach

You are given an integer 'N'. Your task is to find the number formed after swapping each even bit of 'N' in its binary representation with its adjacent bit on the right, assuming that the least significant bit is an odd bit.

Try solving now

3. Search In Rotated Sorted Array

Moderate
30m average time
65% success
0/80
Asked in companies
Tata 1mgWalmartDelhivery

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].

After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.

For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Note:

Can you solve each query in O(logN) ?
Problem approach

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].
After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.
For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Try solving now
03
Round
Easy
HR Round
Duration30 Minutes
Interview date18 Nov 2022
Coding problem1

1. Basic HR Questions

Who has inspired you in your life and why?
What was the toughest decision you ever had to make?
Have you considered starting your own business?

Here's your problem of the day

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

Skill covered: Programming

Which SQL keyword removes duplicate records from a result set?

Choose another skill to practice
Similar interview experiences
company logo
Fullstack Developer
3 rounds | 19 problems
Interviewed by JP Morgan
2677 views
2 comments
0 upvotes
company logo
Software Engineer
4 rounds | 3 problems
Interviewed by JP Morgan
2085 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by JP Morgan
2328 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by JP Morgan
1487 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Summer analyst
1 rounds | 1 problems
Interviewed by Tata Consultancy Services (TCS)
0 views
0 comments
0 upvotes