grindmapcompany-wise LeetCode
All companies

Goldman Sachs LeetCode Questions

261 questions all-time · 48 easy · 165 medium · 48 hard
# Problem Difficulty Frequency Acceptance
1Trapping Rain Water
Hard
100
0.7%
2Median of Two Sorted Arrays
Hard
80
0.5%
3First Unique Character in a String
Easy
78
0.7%
4Fraction to Recurring Decimal
Medium
77
0.3%
5High Five
Easy
76
0.7%
6Minimum Path Sum
Medium
67
0.7%
7Container With Most Water
Medium
65
0.6%
8LRU Cache
Medium
65
0.5%
9Longest Substring Without Repeating Characters
Medium
64
0.4%
10String Compression
Medium
62
0.6%
11Merge Intervals
Medium
60
0.5%
12Robot Bounded In Circle
Medium
60
0.6%
13Find the Winner of the Circular Game
Medium
60
0.8%
14Group Anagrams
Medium
58
0.7%
15Decode Ways
Medium
58
0.4%
16Search in Rotated Sorted Array
Medium
57
0.5%
17Number of Islands
Medium
57
0.6%
18Best Time to Buy and Sell Stock
Easy
55
0.6%
19Find Minimum in Rotated Sorted Array
Medium
55
0.5%
20Knight Probability in Chessboard
Medium
55
0.6%
21Better Compression of String
Medium
55
0.8%
22Two Sum
Easy
53
0.6%
23Best Time to Buy and Sell Stock II
Medium
53
0.7%
24Pairs of Songs With Total Durations Divisible by 60
Medium
53
0.5%
25Valid Arrangement of Pairs
Hard
52
0.7%
26Robot Return to Origin
Easy
52
0.8%
27Design HashMap
Easy
50
0.7%
28Corporate Flight Bookings
Medium
50
0.7%
29Minimum Moves to Capture The Queen
Medium
50
0.2%
30Minimum Length of String After Deleting Similar Ends
Medium
50
0.6%
31Maximum Subarray
Medium
49
0.5%
32Minimum Cost Homecoming of a Robot in a Grid
Medium
49
0.5%
33Range Product Queries of Powers
Medium
49
0.6%
34Shortest Subarray with Sum at Least K
Hard
49
0.3%
35Find the Minimum Amount of Time to Brew Potions
Medium
49
0.6%
36Pascal's Triangle
Easy
47
0.8%
37Kth Largest Element in an Array
Medium
47
0.7%
38Keep Multiplying Found Values by Two
Easy
47
0.8%
39Count Number of Texts
Medium
47
0.5%
40Successful Pairs of Spells and Potions
Medium
47
0.5%
41Top K Frequent Elements
Medium
47
0.7%
42Find All Good Indices
Medium
47
0.4%
43Determine if Two Events Have Conflict
Easy
47
0.5%
44Count Palindromic Subsequences
Hard
47
0.4%
45Count Collisions of Monkeys on a Polygon
Medium
47
0.3%
46Minimum Falling Path Sum
Medium
47
0.6%
47Print Zero Even Odd
Medium
47
0.7%
48Sort the Jumbled Numbers
Medium
47
0.6%
49Perform String Shifts
Easy
47
0.6%
50Minimum Number of Chairs in a Waiting Room
Easy
47
0.8%
51Maximize Palindrome Length From Subsequences
Hard
47
0.4%
52Permutations III
Medium
47
0.9%
53Remove All Adjacent Duplicates in String II
Medium
45
0.6%
54Optimal Account Balancing
Hard
45
0.5%
55Car Pooling
Medium
45
0.6%
56Jump Game
Medium
43
0.4%
57Product of Array Except Self
Medium
43
0.7%
58Sliding Window Maximum
Hard
43
0.5%
59Construct Smallest Number From DI String
Medium
43
0.9%
60Palindromic Substrings
Medium
43
0.7%
61Backspace String Compare
Easy
43
0.5%
62Longest Repeating Character Replacement
Medium
43
0.6%
63Coin Change
Medium
43
0.5%
64Allocate Mailboxes
Hard
43
0.6%
65Number of Perfect Pairs
Medium
43
0.3%
66Design Event Manager
Medium
43
0.5%
67Longest Palindromic Substring
Medium
41
0.4%
683Sum
Medium
41
0.4%
69N-Queens
Hard
41
0.8%
70Sqrt(x)
Easy
41
0.4%
71Subarray Sum Equals K
Medium
41
0.5%
72Check if the Sentence Is Pangram
Easy
41
0.8%
73Integer to English Words
Hard
41
0.4%
74String to Integer (atoi)
Medium
38
0.2%
75Valid Parentheses
Easy
38
0.4%
76Unique Paths
Medium
38
0.7%
77House Robber
Medium
38
0.5%
78The Skyline Problem
Hard
38
0.5%
79Asteroid Collision
Medium
38
0.5%
80Daily Temperatures
Medium
38
0.7%
81Maximum Profit in Job Scheduling
Hard
38
0.5%
82Generate Parentheses
Medium
38
0.8%
83Open the Lock
Medium
38
0.6%
84Consecutive Characters
Easy
38
0.6%
85Move Zeroes
Easy
38
0.6%
86Binary Tree Cameras
Hard
38
0.5%
87Roman to Integer
Easy
35
0.7%
88Pow(x, n)
Medium
35
0.4%
89Spiral Matrix
Medium
35
0.6%
90Candy
Hard
35
0.5%
91Find Peak Element
Medium
35
0.5%
92Find Median from Data Stream
Hard
35
0.5%
93Search a 2D Matrix
Medium
35
0.5%
94Capacity To Ship Packages Within D Days
Medium
35
0.7%
95Minimum Value to Get Positive Step by Step Sum
Easy
35
0.6%
96Design Circular Deque
Medium
35
0.6%
97Reverse Linked List
Easy
35
0.8%
98Circular Array Loop
Medium
35
0.4%
99Longest Consecutive Sequence
Medium
35
0.5%
100Max Area of Island
Medium
35
0.7%
101Course Schedule II
Medium
35
0.6%
102Maximal Rectangle
Hard
35
0.6%
103Minimum Initial Energy to Finish Tasks
Hard
35
0.8%
104Add Two Numbers
Medium
32
0.5%
105Climbing Stairs
Easy
32
0.5%
106Linked List Cycle
Easy
32
0.5%
107Maximum Product Subarray
Medium
32
0.4%
108Minimum Size Subarray Sum
Medium
32
0.5%
109Power of Three
Easy
32
0.5%
110Maximum XOR of Two Numbers in an Array
Medium
32
0.5%
111Reaching Points
Hard
32
0.3%
112Rotting Oranges
Medium
32
0.6%
113Merge k Sorted Lists
Hard
32
0.6%
114Third Maximum Number
Easy
32
0.4%
115Identify the Largest Outlier in an Array
Medium
32
0.4%
116Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
Medium
32
0.7%
117Russian Doll Envelopes
Hard
32
0.4%
118Valid Triangle Number
Medium
32
0.6%
119Task Scheduler
Medium
32
0.6%
120Path with Maximum Gold
Medium
32
0.7%
121Reverse Nodes in k-Group
Hard
32
0.7%
122Koko Eating Bananas
Medium
32
0.5%
123Largest Rectangle in Histogram
Hard
32
0.5%
124Merge Sorted Array
Easy
32
0.6%
125Gas Station
Medium
32
0.5%
126Minimum Window Substring
Hard
32
0.5%
127Letter Combinations of a Phone Number
Medium
27
0.7%
128Next Permutation
Medium
27
0.5%
129First Missing Positive
Hard
27
0.4%
130Jump Game II
Medium
27
0.4%
131Rotate Image
Medium
27
0.8%
132Set Matrix Zeroes
Medium
27
0.6%
133Word Search
Medium
27
0.5%
134Intersection of Two Linked Lists
Easy
27
0.6%
135Best Time to Buy and Sell Stock IV
Hard
27
0.5%
136Maximal Square
Medium
27
0.5%
137Reverse String
Easy
27
0.8%
138Decode String
Medium
27
0.6%
139Minimum Number of Arrows to Burst Balloons
Medium
27
0.6%
140Minimum Number of Refueling Stops
Hard
27
0.4%
141Count Number of Teams
Medium
27
0.7%
142Design Underground System
Medium
27
0.7%
143Find the Closest Palindrome
Hard
27
0.3%
144Max Consecutive Ones III
Medium
27
0.7%
145Validate Binary Search Tree
Medium
27
0.4%
146Single Element in a Sorted Array
Medium
27
0.6%
147Maximum Size Subarray Sum Equals k
Medium
27
0.5%
148Binary Tree Maximum Path Sum
Hard
27
0.4%
149Snakes and Ladders
Medium
27
0.5%
150Game of Life
Medium
27
0.7%
151Spiral Matrix II
Medium
27
0.8%
152Palindrome Pairs
Hard
27
0.4%
153132 Pattern
Medium
27
0.3%
154Frequency of the Most Frequent Element
Medium
27
0.4%
155Path Sum
Easy
27
0.6%
156Implement Stack using Queues
Easy
27
0.7%
157Find First and Last Position of Element in Sorted Array
Medium
27
0.5%
158Binary Tree Level Order Traversal
Medium
27
0.7%
159Partition Equal Subset Sum
Medium
27
0.5%
160Best Time to Buy and Sell Stock III
Hard
27
0.5%
161Count Primes
Medium
27
0.4%
162Distribute Coins in Binary Tree
Medium
27
0.8%
163Greatest Sum Divisible by Three
Medium
27
0.6%
164Magnetic Force Between Two Balls
Medium
27
0.7%
165Shortest Subarray to be Removed to Make Array Sorted
Medium
27
0.5%
166Majority Element
Easy
27
0.7%
167Kth Largest Element in a Stream
Easy
27
0.6%
168Valid Sudoku
Medium
27
0.6%
169Sort Colors
Medium
27
0.7%
170Minimum Number of Moves to Make Palindrome
Hard
27
0.5%
171Minimum Increment to Make Array Unique
Medium
27
0.6%
172Valid Parenthesis String
Medium
27
0.4%
173Integer to Roman
Medium
20
0.7%
174Merge Two Sorted Lists
Easy
20
0.7%
175Pascal's Triangle II
Easy
20
0.7%
176Reorder List
Medium
20
0.7%
177Missing Number
Easy
20
0.7%
178Find the Duplicate Number
Medium
20
0.6%
179Longest Increasing Subsequence
Medium
20
0.6%
180Longest Substring with At Most K Distinct Characters
Medium
20
0.5%
181Next Greater Element I
Easy
20
0.8%
182Count of Integers
Hard
20
0.4%
183Reorganize String
Medium
20
0.6%
184Isomorphic Strings
Easy
20
0.5%
185Word Break
Medium
20
0.5%
186Sudoku Solver
Hard
20
0.7%
187Ugly Number II
Medium
20
0.5%
188Fizz Buzz
Easy
20
0.8%
189Restore IP Addresses
Medium
20
0.6%
190Flood Fill
Easy
20
0.7%
191Subsets
Medium
20
0.8%
192Excel Sheet Column Number
Easy
20
0.7%
193Maximum Sum Circular Subarray
Medium
20
0.5%
194Remove One Element to Make the Array Strictly Increasing
Easy
20
0.3%
195LFU Cache
Hard
20
0.5%
196Simple Bank System
Medium
20
0.7%
197Basic Calculator II
Medium
20
0.5%
198Remove All Occurrences of a Substring
Medium
20
0.8%
199Count Good Nodes in Binary Tree
Medium
20
0.7%
200Two Sum IV - Input is a BST
Easy
20
0.6%
201Next Greater Element II
Medium
20
0.7%
202K-th Symbol in Grammar
Medium
20
0.5%
203Implement Trie (Prefix Tree)
Medium
20
0.7%
204Meeting Rooms III
Hard
20
0.5%
205Design Circular Queue
Medium
20
0.5%
206Lexicographically Smallest String After Substring Operation
Medium
20
0.4%
207Find the Celebrity
Medium
20
0.5%
208Triangle
Medium
20
0.6%
209Shortest Path in Binary Matrix
Medium
20
0.5%
210Bus Routes
Hard
20
0.5%
211Evaluate Reverse Polish Notation
Medium
20
0.6%
212Symmetric Tree
Easy
20
0.6%
213Non-overlapping Intervals
Medium
20
0.6%
214Text Justification
Hard
20
0.5%
215Burst Balloons
Hard
20
0.6%
216Length of Longest Fibonacci Subsequence
Medium
20
0.6%
217Search a 2D Matrix II
Medium
20
0.6%
218Word Ladder
Hard
20
0.5%
219Find Original Array From Doubled Array
Medium
20
0.4%
220Find Pivot Index
Easy
20
0.6%
221Cherry Pickup
Hard
20
0.4%
222Snapshot Array
Medium
20
0.4%
223Maximum Average Subarray I
Easy
20
0.5%
224Permutations II
Medium
20
0.6%
225Longest Palindromic Subsequence
Medium
20
0.7%
226Perfect Squares
Medium
20
0.6%
227Longest Duplicate Substring
Hard
20
0.3%
228Amount of Time for Binary Tree to Be Infected
Medium
20
0.7%
229Binary Tree Zigzag Level Order Traversal
Medium
20
0.6%
230Power of Two
Easy
20
0.5%
231Unique Paths III
Hard
20
0.8%
232Delete the Middle Node of a Linked List
Medium
20
0.6%
233Parsing A Boolean Expression
Hard
20
0.7%
234Find Shortest Path with K Hops
Hard
20
0.7%
235Tree Diameter
Medium
20
0.6%
236Minimum Swaps to Make Strings Equal
Medium
20
0.7%
237Odd Even Linked List
Medium
20
0.6%
238Evaluate Division
Medium
20
0.6%
239Minimum Cost to Reach City With Discounts
Medium
20
0.6%
240Single-Threaded CPU
Medium
20
0.5%
241Permutations
Medium
20
0.8%
242Diameter of N-Ary Tree
Medium
20
0.8%
243K Closest Points to Origin
Medium
20
0.7%
244Car Fleet
Medium
20
0.6%
245Count Square Submatrices with All Ones
Medium
20
0.8%
246Reverse Words in a String
Medium
20
0.6%
247Remove Duplicates from Sorted Array
Easy
20
0.6%
248Find the Longest Substring Containing Vowels in Even Counts
Medium
20
0.8%
249Minimum Insertion Steps to Make a String Palindrome
Hard
20
0.7%
250Shortest Bridge
Medium
20
0.6%
251Design Browser History
Medium
20
0.8%
252Lowest Common Ancestor of a Binary Tree
Medium
20
0.7%
253Valid Anagram
Easy
20
0.7%
254Top K Frequent Words
Medium
20
0.6%
255Is Subsequence
Easy
20
0.5%
256Accounts Merge
Medium
20
0.6%
257Largest Number
Medium
20
0.4%
258Kth Ancestor of a Tree Node
Hard
20
0.4%
259Split Array Largest Sum
Hard
20
0.6%
260Maximum Number of Events That Can Be Attended
Medium
20
0.4%
261Find the Winner of an Array Game
Medium
20
0.6%

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.

Similar companies