JPMorgan 's OA has always been a key area of concern for many students preparing for FinTech positions (FinTech / Quant / Data / SDE). It is not like a pure algorithmic company that only looks at code ability, nor is it like a traditional investment bank that favors behavioral questions, but a combination of both: the questions are short but extremely logical, and you often have to quickly read the scenarios, abstract the mathematical models, and then turn them into executable code within the time limit.
I did the latest version of JPMorgan's OA this time. The overall number of questions is 2, which is relatively enough time, but the speed of thinking is quite demanding. The first question is a typical prefix sum + difference analysis problem, which seems to be simple but requires precise calculation of the optimal solution for each cutting point; the second question is a path summation problem with a dynamic programming (DP) idea, focusing on state transfer and boundary processing. Both questions belong to the type of "once you figure it out, it's easy to write, but before you figure it out, it's very easy to get stuck".
This type of question is actually very reflective of JPMorgan's style of questioning - examining logical reasoning, computational thinking, and control of code readability. For new graduates or interns, it is not simply an algorithm question, but more like a small logic modeling test.
JPMorgan OA Interview Overview
The entire OA consists of two questions, which are not particularly time-consuming, but are slightly convoluted and require careful reading.
I had a smooth AC this time around, largely based on my familiarity with similar question types (prefixes and + DP) in the early stages.
Problem 1: Balance Two Parts of an Array
Description.
Given a list of items with quantities, you need to split the list into two consecutive parts. You can increase or decrease the number of items in each part. The goal is to make the total quantity of both parts equal using the minimum number of operations. Each operation can increase or decrease one unit from any item.
Example.
Input: [1, 2, 5, 4]
Output: 1
Explanation.
Split between 2 and 5 gives [1,2] and [5,4].
Sum(left) = 3, Sum(right) = 9 → Difference = 6 → Need 3 operations per side → Minimum total = 3.
Approach.
Use prefix sum to compute the sum of the left and right parts efficiently.
For every split point, calculate the difference between the two sums.
The minimum number of operations equals abs(sum_left - sum_right) / 2.
Code Idea (Python).
def min_operations(nums).
prefix = [0]
for x in nums.
prefix.append(prefix[-1] + x)
total = prefix[-1]
res = float('inf')
for i in range(1, len(nums))::
left = prefix[i]
right = total - left
res = min(res, abs(left - right) // 2)
return res
Problem 2: Maximum Security Value After Hacker Jumps
Description.
There are n servers in a line, each with a certain security value.
A hacker starts from any server and jumps k servers forward each time (i → i+k).
The process stops when the hacker jumps out of the network.
You need to find the maximum total security value The hacker can collect from any starting position.
Example.
Input: security = [5, 7, 3, 4, 6], k = 2
Output: 13
Explanation.
Start at index 0 → nodes 0, 2, 4 → sum = 5 + 3 + 6 = 14
Start at index 1 → nodes 1, 3 → sum = 7 + 4 = 11
Maximum = 14
Approach.
Use bottom-up dynamic programming.
Let dp[i] represent the maximum total value starting from node i.
Then.
dp[i] = security[i] + dp[i+k] if i+k < n else security[i]
Finally, return max(dp) as the answer.
Code Idea (Python).
def max_security(security, k).
n = len(security)
dp = [0] * n
for i in range(n - 1, -1, -1): dp[i] = security[i].
dp[i] = security[i]: if i + k < n: dp[i] = security[i].
if i + k < n.
dp[i] += dp[i + k]
return max(dp)
Summarize
JPMorgan's set of OA overall favors algorithmic logic questions with a focus on:
- clear thinking: The questions are not long but are easy to read and confuse;
- Realization details: Be especially careful with prefixes and index boundaries with DPs;
- Code Readability: Don't go for the one-liner.
OA ghostwriter/interview assistant, JPMorgan Direct Offer!
Dude, tired of brushing up? Brothers, tired of scrubbing? Don't get hung up on it.ProgramHelp, specializes in JPMorgan/FAANG OA ghostwriting, 24-48 hours delivery, 100% full TC pass, but a full refund!
- Full chain of servicesI have helped 50+ people through the JPMorgan batch, with nearly 1,000 cases, and I can handle finance questions handily.
- Zero Risk Commitment: Mockup/delivery first, pay the final payment when you are satisfied, no brokerage fee (30% cheaper than the market), absolutely original, confidential, Wechat one-on-one guidance indefinitely.
- Real feedback: Last week, I helped a CS trainee brush up on JPM DP questions, Passed the next day, and the Offer arrived! "Senior, it was worth it!" --She said so.