# Morgan Stanley Coding Interview Questions

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

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

53 DSA problems tagged as asked in Morgan Stanley coding interviews and online assessments. Below are all 53: 13 easy, 34 medium and 6 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## Morgan Stanley 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. [Count Binary Substrings](https://www.internhack.in/learn/dsa/problem/count-binary-substrings) (Easy)
3. [Find Subarrays With Equal Sum](https://www.internhack.in/learn/dsa/problem/find-subarrays-with-equal-sum) (Easy)
4. [First Unique Character in a String](https://www.internhack.in/learn/dsa/problem/first-unique-character-in-a-string) (Easy)
5. [Kth Missing Positive Number](https://www.internhack.in/learn/dsa/problem/kth-missing-positive-number) (Easy)
6. [Minimum Cost to Move Chips to The Same Position](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-move-chips-to-the-same-position) (Easy)
7. [Next Greater Element I](https://www.internhack.in/learn/dsa/problem/next-greater-element-i) (Easy)
8. [Palindrome Linked List](https://www.internhack.in/learn/dsa/problem/palindrome-linked-list) (Easy)
9. [Palindrome Number](https://www.internhack.in/learn/dsa/problem/palindrome-number) (Easy)
10. [Remove Duplicates from Sorted Array](https://www.internhack.in/learn/dsa/problem/remove-duplicates-from-sorted-array) (Easy)
11. [Rotate String](https://www.internhack.in/learn/dsa/problem/rotate-string) (Easy)
12. [The Employee That Worked on the Longest Task](https://www.internhack.in/learn/dsa/problem/the-employee-that-worked-on-the-longest-task) (Easy)
13. [Two Sum](https://www.internhack.in/learn/dsa/problem/two-sum) (Easy)
14. [3Sum](https://www.internhack.in/learn/dsa/problem/3sum) (Medium)
15. [Best Team With No Conflicts](https://www.internhack.in/learn/dsa/problem/best-team-with-no-conflicts) (Medium)
16. [Coin Change II](https://www.internhack.in/learn/dsa/problem/coin-change-ii) (Medium)
17. [Contiguous Array](https://www.internhack.in/learn/dsa/problem/contiguous-array) (Medium)
18. [Copy List with Random Pointer](https://www.internhack.in/learn/dsa/problem/copy-list-with-random-pointer) (Medium)
19. [Daily Temperatures](https://www.internhack.in/learn/dsa/problem/daily-temperatures) (Medium)
20. [Find The Original Array of Prefix Xor](https://www.internhack.in/learn/dsa/problem/find-the-original-array-of-prefix-xor) (Medium)
21. [Generate Parentheses](https://www.internhack.in/learn/dsa/problem/generate-parentheses) (Medium)
22. [Group Anagrams](https://www.internhack.in/learn/dsa/problem/group-anagrams) (Medium)
23. [Jump Game](https://www.internhack.in/learn/dsa/problem/jump-game) (Medium)
24. [Kth Largest Element in an Array](https://www.internhack.in/learn/dsa/problem/kth-largest-element-in-an-array) (Medium)
25. [Least Number of Unique Integers after K Removals](https://www.internhack.in/learn/dsa/problem/least-number-of-unique-integers-after-k-removals) (Medium)
26. [Longest Common Subsequence](https://www.internhack.in/learn/dsa/problem/longest-common-subsequence) (Medium)
27. [Longest Palindromic Substring](https://www.internhack.in/learn/dsa/problem/longest-palindromic-substring) (Medium)
28. [Longest Substring Without Repeating Characters](https://www.internhack.in/learn/dsa/problem/longest-substring-without-repeating-characters) (Medium)
29. [LRU Cache](https://www.internhack.in/learn/dsa/problem/lru-cache) (Medium)
30. [Make K-Subarray Sums Equal](https://www.internhack.in/learn/dsa/problem/make-k-subarray-sums-equal) (Medium)
31. [Maximum Product Subarray](https://www.internhack.in/learn/dsa/problem/maximum-product-subarray) (Medium)
32. [Meeting Rooms II](https://www.internhack.in/learn/dsa/problem/meeting-rooms-ii) (Medium)
33. [Merge Intervals](https://www.internhack.in/learn/dsa/problem/merge-intervals) (Medium)
34. [Minimum Number of Lines to Cover Points](https://www.internhack.in/learn/dsa/problem/minimum-number-of-lines-to-cover-points) (Medium)
35. [Minimum Operations to Reduce X to Zero](https://www.internhack.in/learn/dsa/problem/minimum-operations-to-reduce-x-to-zero) (Medium)
36. [Minimum Substring Partition of Equal Character Frequency](https://www.internhack.in/learn/dsa/problem/minimum-substring-partition-of-equal-character-frequency) (Medium)
37. [Minimum Suffix Flips](https://www.internhack.in/learn/dsa/problem/minimum-suffix-flips) (Medium)
38. [Next Greater Element II](https://www.internhack.in/learn/dsa/problem/next-greater-element-ii) (Medium)
39. [Next Greater Element III](https://www.internhack.in/learn/dsa/problem/next-greater-element-iii) (Medium)
40. [Remove All Adjacent Duplicates in String II](https://www.internhack.in/learn/dsa/problem/remove-all-adjacent-duplicates-in-string-ii) (Medium)
41. [Remove Nth Node From End of List](https://www.internhack.in/learn/dsa/problem/remove-nth-node-from-end-of-list) (Medium)
42. [Reorder List](https://www.internhack.in/learn/dsa/problem/reorder-list) (Medium)
43. [Reverse Words in a String](https://www.internhack.in/learn/dsa/problem/reverse-words-in-a-string) (Medium)
44. [Sort Colors](https://www.internhack.in/learn/dsa/problem/sort-colors) (Medium)
45. [Spiral Matrix](https://www.internhack.in/learn/dsa/problem/spiral-matrix) (Medium)
46. [Subarray Sum Equals K](https://www.internhack.in/learn/dsa/problem/subarray-sum-equals-k) (Medium)
47. [Word Search](https://www.internhack.in/learn/dsa/problem/word-search) (Medium)
48. [Candy](https://www.internhack.in/learn/dsa/problem/candy) (Hard)
49. [Count Subarrays With Fixed Bounds](https://www.internhack.in/learn/dsa/problem/count-subarrays-with-fixed-bounds) (Hard)
50. [Find the Longest Valid Obstacle Course at Each Position](https://www.internhack.in/learn/dsa/problem/find-the-longest-valid-obstacle-course-at-each-position) (Hard)
51. [Minimum Number of Taps to Open to Water a Garden](https://www.internhack.in/learn/dsa/problem/minimum-number-of-taps-to-open-to-water-a-garden) (Hard)
52. [Stamping The Sequence](https://www.internhack.in/learn/dsa/problem/stamping-the-sequence) (Hard)
53. [Subarrays with K Different Integers](https://www.internhack.in/learn/dsa/problem/subarrays-with-k-different-integers) (Hard)

## Prepare for the rest of the Morgan Stanley 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)
