
JP Morgan uses the HackerRank platform for the OA, which lasts one hour and requires solving two problems. My two OA problems were Character Reprogramming and Equal Price. Below, I will include the original questions along with my problem-solving process at the time.
I am really grateful for the tool Linkjob.ai, and that's also why I'm sharing my entire OA interview experience here. Having an undetectable AI assistant during the interview is indeed very convenient.


The core requirement of the first problem was very clear: given a string of movement instructions composed of U, D, L, R, I needed to delete as many instructions as possible while ensuring the character ended up at the same final position. Finally, I had to calculate the maximum number of deletions.
Actually, the solution idea didn’t need to be too complicated. I just considered it direction by direction. For example, for the horizontal direction (x-coordinate), if the final horizontal coordinate stayed the same, all L and R instructions could be deleted. If the final horizontal coordinate was shifted, I only kept the instructions moving toward the target direction and deleted the ones in the opposite direction. The vertical direction (y-coordinate) followed the same logic.
When writing the code, I traversed the string in O(N) time, counted the occurrences of U, D, L, and R, and then, according to the logic above, calculated the total number of instructions to keep. Subtracting the number to keep from the total number of instructions gave me the maximum deletions.



The second problem gave an initial price array for n items and q query values. For each query, I needed to calculate the minimum number of operations required to set all item prices to that query value. Each operation could only increase or decrease a single item’s price by 1. Finally, I returned the results for all queries.
My solution idea was to use sorting, binary search, and prefix sums, keeping the overall time complexity at O(n log n). The specific steps were: first, I sorted the price array, then computed a prefix sum array in advance, which made later sum calculations much faster.
When processing each query value q, I first used binary search to find two key positions: one was the last index with a price smaller than q (l), and the other was the first index with a price greater than q (r). Then, items before l needed to be increased. The total steps for increase could be calculated as q * (l + 1) - prefix_sum[l]. Items after r needed to be decreased. The total steps for decrease could be calculated as prefix_sum[n-1] - prefix_sum[r-1] - q * (n - r). Adding these two gave the minimum number of operations for the current query.
The assessment consists of two coding questions, and I had 60 minutes to complete them. JP Morgan’s OA questions mainly focus on data structures and algorithms, but they may also cover topics such as string manipulation, game theory, and team formation scenarios. Sometimes, the test even includes logical reasoning or situational judgment assessments. The coding challenges are similar to LeetCode problems but tend to be more beginner-friendly and structured.
I compared their difficulty with LeetCode and here’s how I see the difference:
Platform | Difficulty Level | Focus Area |
|---|---|---|
LeetCode | Harder | Interview-style problems, algorithm optimization |
HackerRank | Easier | Beginner-friendly, structured learning environment |
Since I was fairly comfortable with LeetCode problems, handling the somewhat easier JP Morgan HackerRank questions wasn’t particularly difficult for me.
Still, I used Linkjob AI just in case any incorrect thinking might affect my score.

In the interview, I first read through both questions and then started with the one I found easier. I wrote the logic in pseudocode first and then moved on to actual code, which helped me avoid wasting time on bugs. Additionally, I kept an eye on the time to make sure I had a few minutes left at the end to review my answers.
I wanted to give myself the best shot at passing the JP Morgan HackerRank questions, so I built a solid prep routine. Here’s what worked for me:
I practiced Java fundamentals on HackerRank, but I also tried Python and C++ since those languages are also popular.
I used pseudocoding to outline my solutions before coding. This helped me organize my thoughts and spot mistakes early.
I focused on data structures and algorithms, using resources like LeetCode and Linkjob for preparation and mock interview.
Strong communication skills helped me stand out. JP Morgan values candidates who can learn quickly, think critically, and solve problems in a fast-paced environment. I made sure to:
Share examples of working with team members and clients.
Highlight times I resolved conflicts through clear communication.
Show active listening and adapt my style for different audiences.
Demonstrate determination and passion for finance.
Note: Recruiters notice when I communicate confidently and support my answers with real experiences.
I found that practicing JP Morgan HackerRank questions also improved my ability to explain technical concepts during interviews. This made me feel more prepared and helped me connect with interviewers.
JP Morgan highly values maintainable code. I used clear variable names (e.g., “transactionAmount” instead of “tA”) and added comments for key steps. There was no need for long paragraphs, just brief notes like “Calculate daily average return” to clarify core logic. Focusing on this detail, the interviewer later specifically mentioned that my OA code was “very readable,” which gave me an edge.
Even if the problem didn’t specify whether “inputs can be empty,” I proactively added checks for empty arrays in my code. For financial data, I accounted for special scenarios like negative amounts or zero values. These details demonstrated my rigor and were a crucial part of the OA’s implicit scoring criteria.
On the same day I submitted the OA, I organized notes on the questions I could recall, my solutions, and any issues I encountered. Later, if I moved on to interviews, the interviewer could ask follow-up questions like “Why did you choose this algorithm for the OA?”. Having notes helped me answer clearly. These review materials also helped me prepare for OAs at other companies, preventing me from making the same mistakes twice.
Typically, JP Morgan does not provide detailed feedback to candidates who fail the HackerRank test. In most cases, candidates will only receive a standard "thank you for your application" email.
The JP Morgan HackerRank test cannot be paused. Once you click "Start," the timer will run continuously, even if you close the browser or lose internet connection. So I specifically set aside 1.5 hours of uninterrupted time, which was longer than the official test duration. I also turned off phone notifications and checked the internet in advance to avoid unexpected disruptions.
JP Morgan has a time restriction for retaking the HackerRank test. You usually cannot retake the test for the same role within 6 months. If you reapply after 6 months, you will receive a new set of HackerRank test questions.
How I Passed the Microsoft HackerRank Test in 2025 on My First Try
Stripe HackerRank Online Assessment Questions I Got in 2025
My Experience of the Databricks New Grad Interview Process in 2025
How I Passed the Maven Securities HackerRank Test 2025
My 2025 Cohere Interview Process and Actual Questions I Faced