JPMorgan Chase OA 2026 : Key Questions & Solutions

1,493Views

Preparing for the JPMorgan Chase Online Assessment ? Here’s a detailed guide featuring two core coding problems you’re likely to encounter, complete with step-by-step Python solutions and practical tips to maximize your performance.

JPMorgan Chase OA 2026 : Key Questions & Solutions

Distinct Digit Numbers

Problem:
Given a range [n, m], count how many numbers in that range have all distinct digits.

Approach:

  1. Iterate through each number in the range.
  2. Convert the number to a string to extract its digits.
  3. Use a set to check if all digits are unique: len(set(digits)) == len(digits).
  4. Increment a counter for each number that meets the condition.

Python Solution:

def count_distinct(n, m):
    count = 0
    for num in range(n, m + 1):
        s = str(num)
        if len(set(s)) == len(s):
            count += 1
    return count

# Example usage
print(count_distinct(10, 25))  # Counts numbers with unique digits between 10 and 25

Tips:

  • This problem tests your ability to manipulate numbers and strings efficiently.
  • Pay attention to edge cases like 0, single-digit numbers, or ranges spanning hundreds/thousands.

First k-Winner in a Queue Tournament

Problem:
Players with integer potentials compete in a queue. In each round:

  • The front two players compete.
  • The higher potential wins, increments its consecutive win count.
  • The loser goes to the back of the queue.

Find the first player to win k consecutive rounds.

Approach:

  1. Initialize a deque with player potentials.
  2. Pop the first player as the current winner and set win_streak = 0.
  3. While win_streak < k:
    • Pop the next player as challenger.
    • If current_winner > challenger, increment win_streak and append the loser to the back.
    • Else, swap roles, reset win_streak = 1, and append the loser.
  4. Return the current winner when win_streak == k.

Python Solution:

from collections import deque

def first_k_winner(potentials, k):
    q = deque(potentials)
    current = q.popleft()
    streak = 0

    while streak < k:
        challenger = q.popleft()
        if current > challenger:
            streak += 1
            q.append(challenger)
        else:
            q.append(current)
            current = challenger
            streak = 1

    return current

# Example usage
print(first_k_winner([3, 1, 4, 2, 5], 3))  # Returns first player to win 3 rounds in a row

Tips:

  • This problem tests your queue operations and logical reasoning.
  • Edge cases include multiple players with equal potential or very large queues.
  • Visualizing rounds can help avoid mistakes.

Next Steps & Preparation Tips

Review JPMorgan’s Leadership Principles and behavioral expectations — OAs often precede behavioral rounds.

Practice similar patterns on platforms like LeetCode, HackerRank, or CodeSignal.

Focus on clean, readable code with comments and proper edge case handling.

Time yourself to simulate real OA conditions.

Optional: Personalized Support

If you want to maximize your OA performance, Programhelp offers:

  • Real-time OA assistance
  • Mock assessments & step-by-step coding guidance
  • Personalized feedback for edge cases, logic, and performance optimization

This ensures you can approach your OA confidently and efficiently.

FAQ — JPMorgan Chase OA

Q1: How many coding questions are in the OA?
A1: Usually 2–3 algorithmic questions, with constraints on time (~60–75 minutes total).

Q2: Are Python solutions acceptable?
A2: Yes, Python, Java, and C++ are commonly supported.

Q3: Is there a behavioral component in the OA?
A3: Not in the OA itself, but behavioral interviews usually follow for shortlisted candidates.

author avatar
Alex Ma Staff Software Engineer
目前就職於Google,10餘年開發經驗,目前擔任Senior Solution Architect職位,北大計算機本碩,擅長各種算法、Java、C++等編程語言。在學校期間多次參加ACM、天池大數據等多項比賽,擁有多項頂級paper、專利等。
END