grindmapcompany-wise LeetCode
All companies

Morgan Stanley LeetCode Questions

60 questions all-time · 13 easy · 40 medium · 7 hard
# Problem Difficulty Frequency Acceptance
1Best Time to Buy and Sell Stock
Array, Dynamic Programming
Easy
100
0.6%
2Best Team With No Conflicts
Array, Dynamic Programming, Sorting
Medium
96
0.5%
3Find the Longest Valid Obstacle Course at Each Position
Array, Binary Search, Binary Indexed Tree
Hard
92
0.6%
4Minimum Number of Lines to Cover Points
Array, Hash Table, Math, Dynamic Programming, Backtracking, Bit Manipulation, Geometry, Bitmask
Medium
92
0.4%
5Minimum Cost to Move Chips to The Same Position
Array, Math, Greedy
Easy
92
0.7%
6Find Subarrays With Equal Sum
Array, Hash Table
Easy
92
0.7%
7The Employee That Worked on the Longest Task
Array
Easy
92
0.5%
8Find The Original Array of Prefix Xor
Array, Bit Manipulation
Medium
92
0.9%
9Two Sum
Array, Hash Table
Easy
86
0.6%
10Longest Substring Without Repeating Characters
Hash Table, String, Sliding Window
Medium
79
0.4%
11Count Subarrays With Fixed Bounds
Array, Queue, Sliding Window, Monotonic Queue
Hard
79
0.7%
12Delete and Earn
Array, Hash Table, Dynamic Programming
Medium
79
0.6%
13Merge Intervals
Array, Sorting
Medium
69
0.5%
14LRU Cache
Hash Table, Linked List, Design, Doubly-Linked List
Medium
69
0.5%
15Palindrome Number
Math
Easy
69
0.6%
16First Unique Character in a String
Hash Table, String, Queue, Counting
Easy
69
0.7%
17Jump Game
Array, Dynamic Programming, Greedy
Medium
62
0.4%
18Sort Colors
Array, Two Pointers, Sorting
Medium
62
0.7%
19Copy List with Random Pointer
Hash Table, Linked List
Medium
62
0.6%
20Kth Largest Element in an Array
Array, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect
Medium
62
0.7%
21Group Anagrams
Array, Hash Table, String, Sorting
Medium
62
0.7%
22Remove Duplicates from Sorted Array
Array, Two Pointers
Easy
62
0.6%
23Stamping The Sequence
String, Stack, Greedy, Queue
Hard
62
0.6%
24Make K-Subarray Sums Equal
Array, Math, Greedy, Sorting, Number Theory
Medium
62
0.4%
25Spiral Matrix
Array, Matrix, Simulation
Medium
62
0.6%
26Daily Temperatures
Array, Stack, Monotonic Stack
Medium
62
0.7%
27Remove Nth Node From End of List
Linked List, Two Pointers
Medium
62
0.5%
28Next Greater Element I
Array, Hash Table, Stack, Monotonic Stack
Easy
51
0.8%
29Contiguous Array
Array, Hash Table, Prefix Sum
Medium
51
0.5%
30Meeting Rooms II
Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue), Prefix Sum
Medium
51
0.5%
313Sum
Array, Two Pointers, Sorting
Medium
51
0.4%
32Subarrays with K Different Integers
Array, Hash Table, Sliding Window, Counting
Hard
51
0.7%
33Generate Parentheses
String, Dynamic Programming, Backtracking
Medium
51
0.8%
34Kth Missing Positive Number
Array, Binary Search
Easy
51
0.6%
35Coin Change II
Array, Dynamic Programming
Medium
51
0.6%
36Word Search
Array, String, Backtracking, Depth-First Search, Matrix
Medium
51
0.5%
37Minimum Operations to Reduce X to Zero
Array, Hash Table, Binary Search, Sliding Window, Prefix Sum
Medium
51
0.4%
38Remove All Adjacent Duplicates in String II
String, Stack
Medium
51
0.6%
39Longest Common Subsequence
String, Dynamic Programming
Medium
51
0.6%
40Next Greater Element III
Math, Two Pointers, String
Medium
51
0.4%
41Minimum Substring Partition of Equal Character Frequency
Hash Table, String, Dynamic Programming, Counting
Medium
51
0.4%
42Minimum Suffix Flips
String, Greedy
Medium
51
0.7%
43Next Greater Element II
Array, Stack, Monotonic Stack
Medium
51
0.7%
44Minimum Number of Taps to Open to Water a Garden
Array, Dynamic Programming, Greedy
Hard
51
0.5%
45Least Number of Unique Integers after K Removals
Array, Hash Table, Greedy, Sorting, Counting
Medium
51
0.6%
46Candy
Array, Greedy
Hard
51
0.5%
47Longest Palindromic Substring
Two Pointers, String, Dynamic Programming
Medium
51
0.4%
48Maximum Product Subarray
Array, Dynamic Programming
Medium
51
0.4%
49Reorder List
Linked List, Two Pointers, Stack, Recursion
Medium
51
0.7%
50Palindrome Linked List
Linked List, Two Pointers, Stack, Recursion
Easy
51
0.6%
51Longest Increasing Subsequence
Array, Binary Search, Dynamic Programming
Medium
51
0.6%
52Majority Element
Array, Hash Table, Divide and Conquer, Sorting, Counting
Easy
51
0.7%
53Sum of Subarray Minimums
Array, Dynamic Programming, Stack, Monotonic Stack
Medium
51
0.4%
54Coin Change
Array, Dynamic Programming, Breadth-First Search
Medium
51
0.5%
55Shuffle the Array
Array
Easy
51
0.9%
56Longest Consecutive Sequence
Array, Hash Table, Union-Find
Medium
51
0.5%
57Container With Most Water
Array, Two Pointers, Greedy
Medium
51
0.6%
58Maximum Subarray
Array, Divide and Conquer, Dynamic Programming
Medium
51
0.5%
59Top K Frequent Elements
Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect
Medium
51
0.7%
60Count of Range Sum
Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set
Hard
51
0.4%

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.