Morgan Stanley Coding Interview Questions

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 (Easy)
  2. Count Binary Substrings (Easy)
  3. Find Subarrays With Equal Sum (Easy)
  4. First Unique Character in a String (Easy)
  5. Kth Missing Positive Number (Easy)
  6. Minimum Cost to Move Chips to The Same Position (Easy)
  7. Next Greater Element I (Easy)
  8. Palindrome Linked List (Easy)
  9. Palindrome Number (Easy)
  10. Remove Duplicates from Sorted Array (Easy)
  11. Rotate String (Easy)
  12. The Employee That Worked on the Longest Task (Easy)
  13. Two Sum (Easy)
  14. 3Sum (Medium)
  15. Best Team With No Conflicts (Medium)
  16. Coin Change II (Medium)
  17. Contiguous Array (Medium)
  18. Copy List with Random Pointer (Medium)
  19. Daily Temperatures (Medium)
  20. Find The Original Array of Prefix Xor (Medium)
  21. Generate Parentheses (Medium)
  22. Group Anagrams (Medium)
  23. Jump Game (Medium)
  24. Kth Largest Element in an Array (Medium)
  25. Least Number of Unique Integers after K Removals (Medium)
  26. Longest Common Subsequence (Medium)
  27. Longest Palindromic Substring (Medium)
  28. Longest Substring Without Repeating Characters (Medium)
  29. LRU Cache (Medium)
  30. Make K-Subarray Sums Equal (Medium)
  31. Maximum Product Subarray (Medium)
  32. Meeting Rooms II (Medium)
  33. Merge Intervals (Medium)
  34. Minimum Number of Lines to Cover Points (Medium)
  35. Minimum Operations to Reduce X to Zero (Medium)
  36. Minimum Substring Partition of Equal Character Frequency (Medium)
  37. Minimum Suffix Flips (Medium)
  38. Next Greater Element II (Medium)
  39. Next Greater Element III (Medium)
  40. Remove All Adjacent Duplicates in String II (Medium)
  41. Remove Nth Node From End of List (Medium)
  42. Reorder List (Medium)
  43. Reverse Words in a String (Medium)
  44. Sort Colors (Medium)
  45. Spiral Matrix (Medium)
  46. Subarray Sum Equals K (Medium)
  47. Word Search (Medium)
  48. Candy (Hard)
  49. Count Subarrays With Fixed Bounds (Hard)
  50. Find the Longest Valid Obstacle Course at Each Position (Hard)
  51. Minimum Number of Taps to Open to Water a Garden (Hard)
  52. Stamping The Sequence (Hard)
  53. Subarrays with K Different Integers (Hard)

Prepare for the rest of the Morgan Stanley process

Other companies