← Goldman Sachs roles

Interview question tracker

Goldman Sachs Coding Interview Questions — All time

Practice 284 coding questions from Goldman Sachs company-tagged LeetCode lists across all available reporting periods. Explore reported interview questions and track your progress.

Company-wide data from Fahad7177-jeh/leetcode-company-wise-questions; see its AGPL-3.0 license. All-time questions also use dataengineervishal/leetcode-companywise-questions (MIT license).

Reporting periods reflect source data, not verified interview dates. Questions can recur; inclusion does not guarantee they will appear in your interview.

Updated weekly · Latest source check: ⓘLatest successful check of the sources used by this company. A check does not necessarily mean the questions changed.

One question at a time.

Top questions 284

DoneQuestionLeetCode
Trapping Rain WaterSolve
First Unique Character in a StringSolve
Fraction to Recurring DecimalSolve
High FiveSolve
Median of Two Sorted ArraysSolve
Best Time to Buy and Sell StockSolve
Container With Most WaterSolve
Decode WaysSolve
Find Minimum in Rotated Sorted ArraySolve
Find the Winner of the Circular GameSolve
Group AnagramsSolve
Longest Substring Without Repeating CharactersSolve
LRU CacheSolve
Minimum Path SumSolve
Number of IslandsSolve
Robot Bounded In CircleSolve
Search in Rotated Sorted ArraySolve
String CompressionSolve
Two SumSolve
Backspace String CompareSolve
Best Time to Buy and Sell Stock IISolve
Better Compression of StringSolve
Check if the Sentence Is PangramSolve
Construct Smallest Number From DI StringSolve
Corporate Flight BookingsSolve
Count Collisions of Monkeys on a PolygonSolve
Count Number of TextsSolve
Count Palindromic SubsequencesSolve
Design HashMapSolve
Determine if Two Events Have ConflictSolve
Find All Good IndicesSolve
Find the Minimum Amount of Time to Brew PotionsSolve
House RobberSolve
Jump GameSolve
Keep Multiplying Found Values by TwoSolve
Knight Probability in ChessboardSolve
Kth Largest Element in an ArraySolve
Longest Palindromic SubstringSolve
Maximize Palindrome Length From SubsequencesSolve
Merge IntervalsSolve
Minimum Cost Homecoming of a Robot in a GridSolve
Minimum Falling Path SumSolve
Minimum Length of String After Deleting Similar EndsSolve
Minimum Moves to Capture The QueenSolve
Minimum Number of Chairs in a Waiting RoomSolve
Pairs of Songs With Total Durations Divisible by 60Solve
Pascal's TriangleSolve
Perform String ShiftsSolve
Permutations IIISolve
Print Zero Even OddSolve
Range Product Queries of PowersSolve
Reaching PointsSolve
Robot Return to OriginSolve
Shortest Subarray with Sum at Least KSolve
Sliding Window MaximumSolve
Sort the Jumbled NumbersSolve
Successful Pairs of Spells and PotionsSolve
Valid Arrangement of PairsSolve
3SumSolve
Add Two NumbersSolve
Allocate MailboxesSolve
Asteroid CollisionSolve
Binary Tree CamerasSolve
Capacity To Ship Packages Within D DaysSolve
Car PoolingSolve
Climbing StairsSolve
Coin ChangeSolve
Consecutive CharactersSolve
Count Number of TeamsSolve
Design Circular DequeSolve
Find Median from Data StreamSolve
Find Peak ElementSolve
First Missing PositiveSolve
Generate ParenthesesSolve
Integer to English WordsSolve
Intersection of Two Linked ListsSolve
Letter Combinations of a Phone NumberSolve
Linked List CycleSolve
Longest Consecutive SequenceSolve
Longest Increasing SubsequenceSolve
Longest Repeating Character ReplacementSolve
Max Consecutive Ones IIISolve
Maximum Product SubarraySolve
Maximum Profit in Job SchedulingSolve
Maximum SubarraySolve
Minimize the Maximum of Two ArraysSolve
Minimum Number of Arrows to Burst BalloonsSolve
Minimum Value to Get Positive Step by Step SumSolve
Missing NumberSolve
Move ZeroesSolve
N-QueensSolve
Next PermutationSolve
Number of Perfect PairsSolve
Open the LockSolve
Optimal Account BalancingSolve
Palindromic SubstringsSolve
Pow(x, n)Solve
Power of ThreeSolve
Product of Array Except SelfSolve
Remove All Adjacent Duplicates in String IISolve
Reverse Linked ListSolve
Rotting OrangesSolve
Search a 2D MatrixSolve
Sqrt(x)Solve
String to Integer (atoi)Solve
Subarray Sum Equals KSolve
The Skyline ProblemSolve
Top K Frequent ElementsSolve
Valid ParenthesesSolve
Word SearchSolve
132 PatternSolve
Add Two Numbers IISolve
Amount of Time for Binary Tree to Be InfectedSolve
Basic Calculator IISolve
Best Time to Buy and Sell Stock IIISolve
Best Time to Buy and Sell Stock IVSolve
Best Time to Buy and Sell Stock with CooldownSolve
Best Time to Buy and Sell Stock with Transaction FeeSolve
Binary Tree Level Order TraversalSolve
Binary Tree Maximum Path SumSolve
Binary Tree Zigzag Level Order TraversalSolve
Burst BalloonsSolve
Bus RoutesSolve
CandySolve
Check if Array Is Sorted and RotatedSolve
Check If Two String Arrays are EquivalentSolve
Cherry PickupSolve
Circular Array LoopSolve
Combination Sum IISolve
Contiguous ArraySolve
Copy List with Random PointerSolve
Count Good Nodes in Binary TreeSolve
Count Number of Pairs With Absolute Difference KSolve
Count of IntegersSolve
Count PrimesSolve
Course Schedule IISolve
Daily TemperaturesSolve
Decode StringSolve
Delete the Middle Node of a Linked ListSolve
Design Circular QueueSolve
Design Underground SystemSolve
Diagonal TraverseSolve
Diameter of N-Ary TreeSolve
Distribute Coins in Binary TreeSolve
Dot Product of Two Sparse VectorsSolve
Evaluate DivisionSolve
Evaluate Reverse Polish NotationSolve
Excel Sheet Column NumberSolve
Find First and Last Position of Element in Sorted ArraySolve
Find Original Array From Doubled ArraySolve
Find Pivot IndexSolve
Find Shortest Path with K HopsSolve
Find the CelebritySolve
Find the Closest PalindromeSolve
Find the Duplicate NumberSolve
Fizz BuzzSolve
Flood FillSolve
Fraction Addition and SubtractionSolve
Frequency of the Most Frequent ElementSolve
Game of LifeSolve
Greatest Sum Divisible by ThreeSolve
H-IndexSolve
High-Access EmployeesSolve
Identify the Largest Outlier in an ArraySolve
Implement Stack using QueuesSolve
Implement Trie (Prefix Tree)Solve
Insert Delete GetRandom O(1)Solve
Integer to RomanSolve
Isomorphic StringsSolve
Jump Game IISolve
Jump Game IIISolve
K-th Symbol in GrammarSolve
Kill ProcessSolve
Koko Eating BananasSolve
Kth Largest Element in a StreamSolve
Largest Rectangle in HistogramSolve
Length of Longest Fibonacci SubsequenceSolve
Lexicographically Smallest String After Substring OperationSolve
LFU CacheSolve
Longest Common PrefixSolve
Longest Duplicate SubstringSolve
Longest Increasing Path in a MatrixSolve
Longest Mountain in ArraySolve
Longest Palindromic SubsequenceSolve
Longest Substring with At Most K Distinct CharactersSolve
Longest Valid ParenthesesSolve
Lowest Common Ancestor of a Binary TreeSolve
Magnetic Force Between Two BallsSolve
Majority ElementSolve
Max Area of IslandSolve
Max Consecutive Ones IISolve
Maximal RectangleSolve
Maximal SquareSolve
Maximum Average Subarray ISolve
Maximum Population YearSolve
Maximum Size Subarray Sum Equals kSolve
Maximum Sum Circular SubarraySolve
Maximum XOR of Two Numbers in an ArraySolve
Meeting Rooms IIISolve
Merge k Sorted ListsSolve
Merge Sorted ArraySolve
Merge Two Sorted ListsSolve
Middle of the Linked ListSolve
Minimum Cost to Reach City With DiscountsSolve
Minimum Increment to Make Array UniqueSolve
Minimum Number of Moves to Make PalindromeSolve
Minimum Number of Refueling StopsSolve
Minimum Size Subarray SumSolve
Minimum Swaps to Make Strings EqualSolve
Next Greater Element ISolve
Next Greater Element IISolve
Next Greater Element IIISolve
Non-overlapping IntervalsSolve
Number of Sub-arrays of Size K and Average Greater than or Equal to ThresholdSolve
Numbers With Repeated DigitsSolve
Odd Even Linked ListSolve
Palindrome PairsSolve
Parsing A Boolean ExpressionSolve
Partition Equal Subset SumSolve
Pascal's Triangle IISolve
Path SumSolve
Path Sum IIISolve
Path with Maximum GoldSolve
Perfect SquaresSolve
Permutation in StringSolve
PermutationsSolve
Permutations IISolve
Power of TwoSolve
Reformat DateSolve
Remove All Occurrences of a SubstringSolve
Remove CommentsSolve
Remove Duplicates from Sorted ArraySolve
Remove Nth Node From End of ListSolve
Remove One Element to Make the Array Strictly IncreasingSolve
Removing Stars From a StringSolve
Reorder ListSolve
Reorganize StringSolve
Restore IP AddressesSolve
Reverse IntegerSolve
Reverse Nodes in k-GroupSolve
Reverse StringSolve
Roman to IntegerSolve
Rotate ImageSolve
Russian Doll EnvelopesSolve
Search a 2D Matrix IISolve
Set Matrix ZeroesSolve
Shortest Path in Binary MatrixSolve
Shortest Subarray to be Removed to Make Array SortedSolve
Simple Bank SystemSolve
Single Element in a Sorted ArraySolve
Single-Threaded CPUSolve
Snakes and LaddersSolve
Snapshot ArraySolve
Sort Array by Increasing FrequencySolve
Sort ColorsSolve
Special Positions in a Binary MatrixSolve
Spiral MatrixSolve
Spiral Matrix IISolve
SubsetsSolve
Sudoku SolverSolve
Super Egg DropSolve
Surrounded RegionsSolve
Symmetric TreeSolve
Task SchedulerSolve
Text JustificationSolve
The kth Factor of nSolve
Third Maximum NumberSolve
Time Based Key-Value StoreSolve
Top K Frequent WordsSolve
Trapping Rain Water IISolve
Tree DiameterSolve
TriangleSolve
Two Sum IV - Input is a BSTSolve
Ugly Number IISolve
Unique PathsSolve
Unique Paths IISolve
Unique Paths IIISolve
Valid PalindromeSolve
Valid SudokuSolve
Valid Triangle NumberSolve
Validate Binary Search TreeSolve
Word BreakSolve
Word LadderSolve
Zigzag ConversionSolve