All company sheets
JP Morgan DSA interview questions
52 problems to practise before your JP Morgan online test or coding round. Most widely asked first.
52
Questions
13
Easy
32
Medium
7
Hard
Commonly reported. Problems candidates often report from this company’s coding rounds. These are Astra’s own tags, not an official question list.
52 questions
- 1
Find the Maximum Depth of a Binary Tree
EasyRecursionTagged at 7 companies - 2
Find the Lowest Common Ancestor of a Binary Search Tree
EasyRecursionTagged at 7 companies - 3
Check if an Array Contains Any Duplicate Values
EasyArrayTagged at 7 companies - 4
Captcha Obfuscation
EasyTwo PointersTagged at 7 companies - 5
Merging Sorted Microservice Logs
EasyTwo PointersTagged at 7 companies - 6
Fault-Tolerant Data Transmission
EasyTwo PointersTagged at 7 companies - 7
Resource Allocation Matcher
EasyTwo PointersTagged at 7 companies - 8
Backspace String Compare
EasyTwo PointersTagged at 7 companies - 9
Find All Subsets II (With Duplicates)
MediumRecursionTagged at 7 companies - 10
Merge Overlapping User Accounts (Accounts Merge)
MediumRecursionTagged at 7 companies - 11
Find a Peak Element in an Array
MediumBinary SearchTagged at 7 companies - 12
Koko Eating Bananas at Minimum Speed
MediumBinary SearchTagged at 7 companies - 13
Find Position of an Element in an Infinite Sorted Array
MediumBinary SearchTagged at 7 companies - 14
Count All Nodes in a Complete Binary Tree
MediumBinary SearchTagged at 7 companies - 15
Implement Python's bisect_left (Lower Bound)
MediumBinary SearchTagged at 7 companies - 16
Implement Python's bisect_right (Upper Bound)
MediumBinary SearchTagged at 7 companies - 17
Insert a New Interval into a Sorted List of Intervals
MediumArrayTagged at 7 companies - 18
Picking Optimal Server Nodes
MediumSliding WindowTagged at 7 companies - 19
Longest Subarray of 1s After Deleting One Element
MediumSliding WindowTagged at 7 companies - 20
Sort Colors
MediumTwo PointersTagged at 7 companies - 21
Valid Anagram
EasyStringTagged at 6 companies - 22
Find Words That Can Be Formed by Characters
EasyStringTagged at 6 companies - 23
Count All Possible Root-to-Leaf Paths in a Generic Tree
EasyTreeTagged at 6 companies - 24
Convert a Roman Numeral String to an Integer
EasyStringTagged at 6 companies - 25
Remove All Adjacent Duplicates in a String
EasyStringTagged at 6 companies - 26
Decode String
MediumStackTagged at 6 companies - 27
Maximum Number of Non-Overlapping Subarrays With Sum Equals Target
MediumDPTagged at 6 companies - 28
Decode String with Repeating Encoded Substrings
MediumStack and QueueTagged at 6 companies - 29
Find Minimum Turns to Open the Lock
MediumStack and QueueTagged at 6 companies - 30
Remove Zero Sum Consecutive Sublists
MediumLinkedListTagged at 6 companies - 31
Find Triplet with a Given Sum in a Doubly Linked List
MediumLinkedListTagged at 6 companies - 32
Merge Two Sorted Lists in Reverse Order
MediumLinkedListTagged at 6 companies - 33
Delete N Nodes After M Nodes of a Linked List
MediumLinkedListTagged at 6 companies - 34
Implement a Trie (Prefix Tree) - Insert
MediumTreeTagged at 6 companies - 35
Design an Add and Search Word Data Structure (Trie)
MediumTreeTagged at 6 companies - 36
Find the Diameter of an N-ary Tree
MediumTreeTagged at 6 companies - 37
Check if a Binary Tree is a Complete Tree
MediumTreeTagged at 6 companies - 38
Find the Maximum Width of a Binary Tree
MediumTreeTagged at 6 companies - 39
Solve the Word Break Problem (DP)
MediumStringTagged at 6 companies - 40
Find the Longest Common Subsequence (LCS)
MediumStringTagged at 6 companies - 41
Implement Basic Calculator II with +, -, *, /
MediumStringTagged at 6 companies - 42
Implement a String Decoding Function (e.g., 3[a2[c]])
MediumStringTagged at 6 companies - 43
Find the Longest Palindromic Subsequence (LPS)
MediumStringTagged at 6 companies - 44
Implement Regular Expression Matching with '.' and '*'
HardRecursionTagged at 6 companies - 45
Split an Array to Minimize Largest Sum
HardBinary SearchTagged at 6 companies - 46
Parallel Courses (BFS Level Order)
MediumGraphTagged at 5 companies - 47
Skyscanner Flight Aggregator
MediumGraphTagged at 5 companies - 48
Serialize and Deserialize an N-ary Tree
HardTreeTagged at 5 companies - 49
Implement a B-Tree (Conceptual)
HardTreeTagged at 5 companies - 50
Find the Vertical Order Traversal of a Binary Tree (Google)
HardTreeTagged at 5 companies - 51
Find the Longest Duplicate Substring in a String
HardStringTagged at 5 companies - 52
Paint House III
HardDPTagged at 4 companies