grindmapcompany-wise LeetCode
All companies

J.P. Morgan LeetCode Questions

79 questions all-time · 27 easy · 47 medium · 5 hard
# Problem Difficulty Frequency Acceptance
1Sort Integers by The Number of 1 Bits
Array, Bit Manipulation, Sorting, Counting
Easy
100
78.7%
2Reaching Points
Math
Hard
97
33.6%
3Least Number of Unique Integers after K Removals
Array, Hash Table, Greedy, Sorting, Counting
Medium
93
63.4%
4Minimum Suffix Flips
String, Greedy
Medium
91
73.5%
5Remove Colored Pieces if Both Neighbors are the Same Color
Math, String, Greedy, Game Theory
Medium
89
62.8%
6Break a Palindrome
String, Greedy
Medium
86
51.5%
7Minimum Absolute Difference
Array, Sorting
Easy
83
70.7%
8Next Permutation
Array, Two Pointers
Medium
83
43.1%
9Check Whether Two Strings are Almost Equivalent
Hash Table, String, Counting
Easy
83
63.6%
10Group Anagrams
Array, Hash Table, String, Sorting
Medium
78
70.9%
11Best Time to Buy and Sell Stock
Array, Dynamic Programming
Easy
76
55.3%
12Determine Color of a Chessboard Square
Math, String
Easy
74
79.3%
13Minimum Swaps to Make Strings Equal
Math, String, Greedy
Medium
74
64.7%
14Numbers With Repeated Digits
Math, Dynamic Programming
Hard
74
43.5%
15Merge Intervals
Array, Sorting
Medium
72
49.4%
16Suspicious Bank Accounts
Database
Medium
70
44.9%
17Button with Longest Push Time
Array
Easy
70
40.6%
18Display Table of Food Orders in a Restaurant
Array, Hash Table, String, Sorting, Ordered Set
Medium
70
75.7%
19Check if Number Has Equal Digit Count and Digit Value
Hash Table, String, Counting
Easy
70
72.4%
20Maximum Number of Points From Grid Queries
Array, Two Pointers, Breadth-First Search, Union Find, Sorting, Heap (Priority Queue), Matrix
Hard
70
59.5%
21Valid Parentheses
String, Stack
Easy
70
42.3%
22Lexicographically Smallest String After Applying Operations
String, Depth-First Search, Breadth-First Search, Enumeration
Medium
70
65.3%
23Rotate Image
Array, Math, Matrix
Medium
70
77.9%
24Lexicographically Smallest String After a Swap
String, Greedy
Easy
70
53.7%
25Reverse Odd Levels of Binary Tree
Tree, Depth-First Search, Breadth-First Search, Binary Tree
Medium
70
86.6%
26Find Resultant Array After Removing Anagrams
Array, Hash Table, String, Sorting
Easy
68
59.5%
27Longest Palindromic Substring
Two Pointers, String, Dynamic Programming
Medium
66
35.8%
28Count Numbers with Unique Digits
Math, Dynamic Programming, Backtracking
Medium
63
54.3%
29Happy Number
Hash Table, Math, Two Pointers
Easy
60
58.1%
30Longest Substring Without Repeating Characters
Hash Table, String, Sliding Window
Medium
60
36.9%
31Climbing Stairs
Math, Dynamic Programming, Memoization
Easy
56
53.5%
32Maximum Product of Two Elements in an Array
Array, Sorting, Heap (Priority Queue)
Easy
56
83.2%
33Minimum Operations to Make All Array Elements Equal
Array, Binary Search, Sorting, Prefix Sum
Medium
51
36.9%
34Subarray Sum Equals K
Array, Hash Table, Prefix Sum
Medium
51
45.5%
35Maximum Units on a Truck
Array, Greedy, Sorting
Easy
51
74.3%
36Two Sum
Array, Hash Table
Easy
51
55.8%
37Fizz Buzz
Math, String, Simulation
Easy
51
74.4%
38Intersection of Two Arrays
Array, Hash Table, Two Pointers, Binary Search, Sorting
Easy
51
76.5%
39Generate Parentheses
String, Dynamic Programming, Backtracking
Medium
51
77.1%
40Maximum Subarray
Array, Divide and Conquer, Dynamic Programming
Medium
51
52.1%
41Best Time to Buy and Sell Stock II
Array, Dynamic Programming, Greedy
Medium
51
69.5%
42Rearrange Array to Maximize Prefix Score
Array, Greedy, Sorting, Prefix Sum
Medium
51
41.5%
43Coin Change
Array, Dynamic Programming, Breadth-First Search
Medium
45
46.5%
44Non-overlapping Intervals
Array, Dynamic Programming, Greedy, Sorting
Medium
45
55.5%
45Fibonacci Number
Math, Dynamic Programming, Recursion, Memoization
Easy
45
72.9%
46Minimum Cost to Connect Sticks
Array, Greedy, Heap (Priority Queue)
Medium
45
71.2%
47Pascal's Triangle
Array, Dynamic Programming
Easy
45
77.0%
48Minimum Cost to Make Array Equal
Array, Binary Search, Greedy, Sorting, Prefix Sum
Hard
45
46.3%
49LRU Cache
Hash Table, Linked List, Design, Doubly-Linked List
Medium
45
45.2%
50Daily Temperatures
Array, Stack, Monotonic Stack
Medium
45
67.4%
51Binary Tree Right Side View
Tree, Depth-First Search, Breadth-First Search, Binary Tree
Medium
45
67.0%
52Reverse Linked List
Linked List, Recursion
Easy
45
79.2%
53Two Sum II - Input Array Is Sorted
Array, Two Pointers, Binary Search
Medium
36
63.4%
54Set Matrix Zeroes
Array, Hash Table, Matrix
Medium
36
60.7%
55Find Occurrences of an Element in an Array
Array, Hash Table
Medium
36
72.6%
56Letter Combinations of a Phone Number
Hash Table, String, Backtracking
Medium
36
63.9%
57Palindrome Number
Math
Easy
36
59.2%
58Kth Largest Element in an Array
Array, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect
Medium
36
68.0%
59Top K Frequent Elements
Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect
Medium
36
64.6%
60Average Time of Process per Machine
Database
Easy
36
68.6%
61Container With Most Water
Array, Two Pointers, Greedy
Medium
36
57.8%
62Permutations
Array, Backtracking
Medium
36
80.7%
63Shuffle an Array
Array, Math, Design, Randomized
Medium
36
59.0%
64Count Binary Substrings
Two Pointers, String
Easy
36
65.9%
65Count Strictly Increasing Subarrays
Array, Math, Dynamic Programming
Medium
36
71.3%
66Open the Lock
Array, Hash Table, String, Breadth-First Search
Medium
36
60.7%
67Minimum String Length After Removing Substrings
String, Stack, Simulation
Easy
36
77.1%
68Cherry Pickup
Array, Dynamic Programming, Matrix
Hard
36
37.9%
69Degree of an Array
Array, Hash Table
Easy
36
57.4%
70Minimum Insertions to Balance a Parentheses String
String, Stack, Greedy
Medium
36
53.2%
71Search Suggestions System
Array, String, Binary Search, Trie, Sorting, Heap (Priority Queue)
Medium
36
65.1%
72Find the Duplicate Number
Array, Two Pointers, Binary Search, Bit Manipulation
Medium
36
62.8%
73Ugly Number
Math
Easy
36
42.3%
74Contains Duplicate
Array, Hash Table, Sorting
Easy
36
63.2%
75Sum of Subarray Ranges
Array, Stack, Monotonic Stack
Medium
36
60.1%
76Decode Ways
String, Dynamic Programming
Medium
36
36.5%
77Combination Sum
Array, Backtracking
Medium
36
74.7%
78Integer to Roman
Hash Table, Math, String
Medium
36
68.6%
79Spiral Matrix
Array, Matrix, Simulation
Medium
36
53.9%

How to read this list

The tabs at the top split the questions by how recently people said they were asked in interviews. "Last 30 Days" is the past month, "Last 3 Months" is the past quarter, and so on. "All Time" is every question on record for this company.

Frequency is a score from 0 to 100 for how often a question showed up in that time window. A higher number means it came up more often, so the list starts with the most common questions first. Acceptance is the share of submissions that pass on LeetCode. Click any question to open it on LeetCode.