# Jpmorgan Coding Interview Questions

> 78 DSA problems asked in Jpmorgan coding interviews and online assessments, sorted easiest first with hints. Free practice for placements on InternHack.

Canonical: https://www.internhack.in/learn/dsa/companies/jpmorgan
Last updated: 2026-11-28

78 DSA problems tagged as asked in Jpmorgan coding interviews and online assessments. Below are all 78: 25 easy, 45 medium and 8 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## Jpmorgan DSA problems, easiest first

1. [Best Time to Buy and Sell Stock](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock) (Easy)
2. [Button with Longest Push Time](https://www.internhack.in/learn/dsa/problem/button-with-longest-push-time) (Easy)
3. [Check if Number Has Equal Digit Count and Digit Value](https://www.internhack.in/learn/dsa/problem/check-if-number-has-equal-digit-count-and-digit-value) (Easy)
4. [Climbing Stairs](https://www.internhack.in/learn/dsa/problem/climbing-stairs) (Easy)
5. [Count Binary Substrings](https://www.internhack.in/learn/dsa/problem/count-binary-substrings) (Easy)
6. [Degree of an Array](https://www.internhack.in/learn/dsa/problem/degree-of-an-array) (Easy)
7. [Determine Color of a Chessboard Square](https://www.internhack.in/learn/dsa/problem/determine-color-of-a-chessboard-square) (Easy)
8. [Find Common Characters](https://www.internhack.in/learn/dsa/problem/find-common-characters) (Easy)
9. [Find Resultant Array After Removing Anagrams](https://www.internhack.in/learn/dsa/problem/find-resultant-array-after-removing-anagrams) (Easy)
10. [First Unique Character in a String](https://www.internhack.in/learn/dsa/problem/first-unique-character-in-a-string) (Easy)
11. [Fizz Buzz](https://www.internhack.in/learn/dsa/problem/fizz-buzz) (Easy)
12. [Happy Number](https://www.internhack.in/learn/dsa/problem/happy-number) (Easy)
13. [Intersection of Two Arrays](https://www.internhack.in/learn/dsa/problem/intersection-of-two-arrays) (Easy)
14. [Last Stone Weight](https://www.internhack.in/learn/dsa/problem/last-stone-weight) (Easy)
15. [Lexicographically Smallest String After a Swap](https://www.internhack.in/learn/dsa/problem/lexicographically-smallest-string-after-a-swap) (Easy)
16. [Maximum Product of Two Elements in an Array](https://www.internhack.in/learn/dsa/problem/maximum-product-of-two-elements-in-an-array) (Easy)
17. [Minimum Absolute Difference](https://www.internhack.in/learn/dsa/problem/minimum-absolute-difference) (Easy)
18. [Minimum String Length After Removing Substrings](https://www.internhack.in/learn/dsa/problem/minimum-string-length-after-removing-substrings) (Easy)
19. [Minimum Time to Type Word Using Special Typewriter](https://www.internhack.in/learn/dsa/problem/minimum-time-to-type-word-using-special-typewriter) (Easy)
20. [Number Complement](https://www.internhack.in/learn/dsa/problem/number-complement) (Easy)
21. [Reverse Linked List](https://www.internhack.in/learn/dsa/problem/reverse-linked-list) (Easy)
22. [Roman to Integer](https://www.internhack.in/learn/dsa/problem/roman-to-integer) (Easy)
23. [Slowest Key](https://www.internhack.in/learn/dsa/problem/slowest-key) (Easy)
24. [Two Sum](https://www.internhack.in/learn/dsa/problem/two-sum) (Easy)
25. [Valid Parentheses](https://www.internhack.in/learn/dsa/problem/valid-parentheses) (Easy)
26. [Best Time to Buy and Sell Stock II](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock-ii) (Medium)
27. [Coin Change](https://www.internhack.in/learn/dsa/problem/coin-change) (Medium)
28. [Construct String With Repeat Limit](https://www.internhack.in/learn/dsa/problem/construct-string-with-repeat-limit) (Medium)
29. [Container With Most Water](https://www.internhack.in/learn/dsa/problem/container-with-most-water) (Medium)
30. [Daily Temperatures](https://www.internhack.in/learn/dsa/problem/daily-temperatures) (Medium)
31. [Display Table of Food Orders in a Restaurant](https://www.internhack.in/learn/dsa/problem/display-table-of-food-orders-in-a-restaurant) (Medium)
32. [Divide Players Into Teams of Equal Skill](https://www.internhack.in/learn/dsa/problem/divide-players-into-teams-of-equal-skill) (Medium)
33. [Find Occurrences of an Element in an Array](https://www.internhack.in/learn/dsa/problem/find-occurrences-of-an-element-in-an-array) (Medium)
34. [Find Peak Element](https://www.internhack.in/learn/dsa/problem/find-peak-element) (Medium)
35. [Find The First Player to win K Games in a Row](https://www.internhack.in/learn/dsa/problem/find-the-first-player-to-win-k-games-in-a-row) (Medium)
36. [Find the Winner of an Array Game](https://www.internhack.in/learn/dsa/problem/find-the-winner-of-an-array-game) (Medium)
37. [Get Equal Substrings Within Budget](https://www.internhack.in/learn/dsa/problem/get-equal-substrings-within-budget) (Medium)
38. [Group Anagrams](https://www.internhack.in/learn/dsa/problem/group-anagrams) (Medium)
39. [Letter Combinations of a Phone Number](https://www.internhack.in/learn/dsa/problem/letter-combinations-of-a-phone-number) (Medium)
40. [Lexicographically Smallest String After Applying Operations](https://www.internhack.in/learn/dsa/problem/lexicographically-smallest-string-after-applying-operations) (Medium)
41. [Longest Consecutive Sequence](https://www.internhack.in/learn/dsa/problem/longest-consecutive-sequence) (Medium)
42. [Longest Palindromic Substring](https://www.internhack.in/learn/dsa/problem/longest-palindromic-substring) (Medium)
43. [Longest Substring Without Repeating Characters](https://www.internhack.in/learn/dsa/problem/longest-substring-without-repeating-characters) (Medium)
44. [LRU Cache](https://www.internhack.in/learn/dsa/problem/lru-cache) (Medium)
45. [Maximum Subarray](https://www.internhack.in/learn/dsa/problem/maximum-subarray) (Medium)
46. [Meeting Rooms II](https://www.internhack.in/learn/dsa/problem/meeting-rooms-ii) (Medium)
47. [Merge Intervals](https://www.internhack.in/learn/dsa/problem/merge-intervals) (Medium)
48. [Minimum Cost to Connect Sticks](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-connect-sticks) (Medium)
49. [Minimum Moves to Equal Array Elements](https://www.internhack.in/learn/dsa/problem/minimum-moves-to-equal-array-elements) (Medium)
50. [Minimum Number of Steps to Make Two Strings Anagram](https://www.internhack.in/learn/dsa/problem/minimum-number-of-steps-to-make-two-strings-anagram) (Medium)
51. [Minimum Operations to Make All Array Elements Equal](https://www.internhack.in/learn/dsa/problem/minimum-operations-to-make-all-array-elements-equal) (Medium)
52. [Minimum Prefix Removal to Make Array Strictly Increasing](https://www.internhack.in/learn/dsa/problem/minimum-prefix-removal-to-make-array-strictly-increasing) (Medium)
53. [Minimum Suffix Flips](https://www.internhack.in/learn/dsa/problem/minimum-suffix-flips) (Medium)
54. [Minimum Swaps to Make Strings Equal](https://www.internhack.in/learn/dsa/problem/minimum-swaps-to-make-strings-equal) (Medium)
55. [Non-overlapping Intervals](https://www.internhack.in/learn/dsa/problem/non-overlapping-intervals) (Medium)
56. [Number of Ways to Split Array](https://www.internhack.in/learn/dsa/problem/number-of-ways-to-split-array) (Medium)
57. [Permutations](https://www.internhack.in/learn/dsa/problem/permutations) (Medium)
58. [Rearrange Array to Maximize Prefix Score](https://www.internhack.in/learn/dsa/problem/rearrange-array-to-maximize-prefix-score) (Medium)
59. [Reverse Odd Levels of Binary Tree](https://www.internhack.in/learn/dsa/problem/reverse-odd-levels-of-binary-tree) (Medium)
60. [Rotate Image](https://www.internhack.in/learn/dsa/problem/rotate-image) (Medium)
61. [Sell Diminishing-Valued Colored Balls](https://www.internhack.in/learn/dsa/problem/sell-diminishing-valued-colored-balls) (Medium)
62. [Set Matrix Zeroes](https://www.internhack.in/learn/dsa/problem/set-matrix-zeroes) (Medium)
63. [Shuffle an Array](https://www.internhack.in/learn/dsa/problem/shuffle-an-array) (Medium)
64. [Spiral Matrix](https://www.internhack.in/learn/dsa/problem/spiral-matrix) (Medium)
65. [Subarray Sums Divisible by K](https://www.internhack.in/learn/dsa/problem/subarray-sums-divisible-by-k) (Medium)
66. [Suspicious Bank Accounts](https://www.internhack.in/learn/dsa/problem/suspicious-bank-accounts) (Medium)
67. [Taking Maximum Energy From the Mystic Dungeon](https://www.internhack.in/learn/dsa/problem/taking-maximum-energy-from-the-mystic-dungeon) (Medium)
68. [Top K Frequent Elements](https://www.internhack.in/learn/dsa/problem/top-k-frequent-elements) (Medium)
69. [Two Best Non-Overlapping Events](https://www.internhack.in/learn/dsa/problem/two-best-non-overlapping-events) (Medium)
70. [Two Sum II - Input Array Is Sorted](https://www.internhack.in/learn/dsa/problem/two-sum-ii-input-array-is-sorted) (Medium)
71. [Distinct Subsequences](https://www.internhack.in/learn/dsa/problem/distinct-subsequences) (Hard)
72. [Find Median from Data Stream](https://www.internhack.in/learn/dsa/problem/find-median-from-data-stream) (Hard)
73. [Maximum Number of Points From Grid Queries](https://www.internhack.in/learn/dsa/problem/maximum-number-of-points-from-grid-queries) (Hard)
74. [Minimum Cost to Make Array Equal](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-make-array-equal) (Hard)
75. [Numbers With Repeated Digits](https://www.internhack.in/learn/dsa/problem/numbers-with-repeated-digits) (Hard)
76. [Reaching Points](https://www.internhack.in/learn/dsa/problem/reaching-points) (Hard)
77. [Sliding Window Maximum](https://www.internhack.in/learn/dsa/problem/sliding-window-maximum) (Hard)
78. [Trapping Rain Water](https://www.internhack.in/learn/dsa/problem/trapping-rain-water) (Hard)

## Prepare for the rest of the Jpmorgan process

- [Aptitude questions by company](https://www.internhack.in/learn/aptitude/companies)
- [Technical interview questions](https://www.internhack.in/learn/interview)
- [Free ATS resume check](https://www.internhack.in/ats-score/try), no signup

## Other companies

- [Google](https://www.internhack.in/learn/dsa/companies/google) (2217)
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon) (1938)
- [Meta](https://www.internhack.in/learn/dsa/companies/meta) (1387)
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft) (1352)
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg) (1173)
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok) (383)
- [Uber](https://www.internhack.in/learn/dsa/companies/uber) (381)
- [Apple](https://www.internhack.in/learn/dsa/companies/apple) (356)
- [Oracle](https://www.internhack.in/learn/dsa/companies/oracle) (340)
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs) (270)
- [Adobe](https://www.internhack.in/learn/dsa/companies/adobe) (227)
- [TCS](https://www.internhack.in/learn/dsa/companies/tcs) (217)
- [Salesforce](https://www.internhack.in/learn/dsa/companies/salesforce) (189)
- [Linkedin](https://www.internhack.in/learn/dsa/companies/linkedin) (180)
- [Zoho](https://www.internhack.in/learn/dsa/companies/zoho) (179)
- [IBM](https://www.internhack.in/learn/dsa/companies/ibm) (170)
- [Infosys](https://www.internhack.in/learn/dsa/companies/infosys) (158)
- [Walmart Labs](https://www.internhack.in/learn/dsa/companies/walmart-labs) (152)
- [Accenture](https://www.internhack.in/learn/dsa/companies/accenture) (144)
- [Nvidia](https://www.internhack.in/learn/dsa/companies/nvidia) (137)
- [Yandex](https://www.internhack.in/learn/dsa/companies/yandex) (134)
- [DE Shaw](https://www.internhack.in/learn/dsa/companies/de-shaw) (124)
- [Visa](https://www.internhack.in/learn/dsa/companies/visa) (124)
- [Flipkart](https://www.internhack.in/learn/dsa/companies/flipkart) (117)

## Related

- [Home](https://www.internhack.in/)
- [Learn](https://www.internhack.in/learn)
- [DSA by company](https://www.internhack.in/learn/dsa/companies)
