← Goldman Sachs roles

Interview question tracker

Goldman Sachs SDE 2

The 264 highest-frequency questions from all time. Finish the strongest signals first.

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 264

DoneQuestionLeetCode
Trapping Rain WaterSolve
Median of Two Sorted ArraysSolve
First Unique Character in a StringSolve
Fraction to Recurring DecimalSolve
High FiveSolve
Minimum Path SumSolve
Container With Most WaterSolve
LRU CacheSolve
Longest Substring Without Repeating CharactersSolve
String CompressionSolve
Find the Winner of the Circular GameSolve
Merge IntervalsSolve
Decode WaysSolve
Number of IslandsSolve
Group AnagramsSolve
Robot Bounded In CircleSolve
Search in Rotated Sorted ArraySolve
Best Time to Buy and Sell StockSolve
Knight Probability in ChessboardSolve
Two SumSolve
Find Minimum in Rotated Sorted ArraySolve
Longest Palindromic SubsequenceSolve
Maximum SubarraySolve
Best Time to Buy and Sell Stock IISolve
Robot Return to OriginSolve
Sell Diminishing-Valued Colored BallsSolve
Better Compression of StringSolve
Design HashMapSolve
Find the Minimum Amount of Time to Brew PotionsSolve
Valid Arrangement of PairsSolve
Car PoolingSolve
Corporate Flight BookingsSolve
Kth Largest Element in an ArraySolve
Minimum Length of String After Deleting Similar EndsSolve
Minimum Moves to Capture The QueenSolve
Pascal's TriangleSolve
Permutations IIISolve
Remove All Adjacent Duplicates in String IISolve
Top K Frequent ElementsSolve
Minimum Cost Homecoming of a Robot in a GridSolve
Optimal Account BalancingSolve
Pairs of Songs With Total Durations Divisible by 60Solve
Range Product Queries of PowersSolve
Sliding Window MaximumSolve
Allocate MailboxesSolve
Backspace String CompareSolve
Coin ChangeSolve
Construct Smallest Number From DI StringSolve
Count Collisions of Monkeys on a PolygonSolve
Count Number of TextsSolve
Count Palindromic SubsequencesSolve
Design Event ManagerSolve
Determine if Two Events Have ConflictSolve
Find All Good IndicesSolve
Keep Multiplying Found Values by TwoSolve
Longest Palindromic SubstringSolve
Maximize Palindrome Length From SubsequencesSolve
Minimum Falling Path SumSolve
Minimum Number of Chairs in a Waiting RoomSolve
Number of Perfect PairsSolve
Palindromic SubstringsSolve
Perform String ShiftsSolve
Print Zero Even OddSolve
Product of Array Except SelfSolve
Shortest Subarray with Sum at Least KSolve
Sort the Jumbled NumbersSolve
Successful Pairs of Spells and PotionsSolve
3SumSolve
Binary Tree CamerasSolve
Check if the Sentence Is PangramSolve
Jump GameSolve
Longest Repeating Character ReplacementSolve
N-QueensSolve
Search a 2D MatrixSolve
Sqrt(x)Solve
Valid ParenthesesSolve
Asteroid CollisionSolve
Binary Tree Maximum Path SumSolve
Capacity To Ship Packages Within D DaysSolve
Consecutive CharactersSolve
Daily TemperaturesSolve
Gas StationSolve
Generate ParenthesesSolve
House RobberSolve
Longest Consecutive SequenceSolve
Open the LockSolve
Rotting OrangesSolve
String to Integer (atoi)Solve
Subarray Sum Equals KSolve
The Skyline ProblemSolve
Unique PathsSolve
CandySolve
Circular Array LoopSolve
Count Paths That Can Form a Palindrome in a TreeSolve
Course Schedule IISolve
Domino and Tromino TilingSolve
Find Median from Data StreamSolve
Find Peak ElementSolve
Koko Eating BananasSolve
Maximal RectangleSolve
Maximum Profit in Job SchedulingSolve
Minimum Initial Energy to Finish TasksSolve
Minimum Value to Get Positive Step by Step SumSolve
Move ZeroesSolve
Pow(x, n)Solve
Search a 2D Matrix IISolve
Spiral MatrixSolve
Task SchedulerSolve
Valid Triangle NumberSolve
Add Two NumbersSolve
Best Time to Buy and Sell Stock IVSolve
Climbing StairsSolve
Decode StringSolve
Design Circular DequeSolve
First Missing PositiveSolve
Identify the Largest Outlier in an ArraySolve
Integer to English WordsSolve
Linked List CycleSolve
Max Area of IslandSolve
Max Consecutive Ones IIISolve
Maximal SquareSolve
Merge Sorted ArraySolve
Minimum Size Subarray SumSolve
Minimum Window SubstringSolve
Number of Sub-arrays of Size K and Average Greater than or Equal to ThresholdSolve
Path with Maximum GoldSolve
Reverse Linked ListSolve
Reverse Nodes in k-GroupSolve
Russian Doll EnvelopesSolve
Set Matrix ZeroesSolve
Single Element in a Sorted ArraySolve
Third Maximum NumberSolve
132 PatternSolve
Best Time to Buy and Sell Stock IIISolve
Binary Tree Level Order TraversalSolve
Count PrimesSolve
Distribute Coins in Binary TreeSolve
Find First and Last Position of Element in Sorted ArraySolve
Find the Duplicate NumberSolve
Frequency of the Most Frequent ElementSolve
Greatest Sum Divisible by ThreeSolve
Implement Stack using QueuesSolve
Implement Trie (Prefix Tree)Solve
Intersection of Two Linked ListsSolve
Jump Game IISolve
Kth Largest Element in a StreamSolve
Largest Rectangle in HistogramSolve
Letter Combinations of a Phone NumberSolve
Magnetic Force Between Two BallsSolve
Majority ElementSolve
Maximum Product SubarraySolve
Maximum Size Subarray Sum Equals kSolve
Merge k Sorted ListsSolve
Minimum Increment to Make Array UniqueSolve
Minimum Number of Arrows to Burst BalloonsSolve
Minimum Number of Moves to Make PalindromeSolve
Next PermutationSolve
Palindrome PairsSolve
Partition Equal Subset SumSolve
Path SumSolve
Power of ThreeSolve
Reverse StringSolve
Roman to IntegerSolve
Shortest Subarray to be Removed to Make Array SortedSolve
Snakes and LaddersSolve
Sort ColorsSolve
Spiral Matrix IISolve
Sudoku SolverSolve
Valid Parenthesis StringSolve
Valid SudokuSolve
Word SearchSolve
Accounts MergeSolve
Amount of Time for Binary Tree to Be InfectedSolve
Binary Tree Zigzag Level Order TraversalSolve
Burst BalloonsSolve
Car FleetSolve
Cherry PickupSolve
Count Number of TeamsSolve
Count of IntegersSolve
Count Square Submatrices with All OnesSolve
Course ScheduleSolve
Delete the Middle Node of a Linked ListSolve
Design Browser HistorySolve
Design Circular QueueSolve
Design Underground SystemSolve
Diameter of N-Ary TreeSolve
Evaluate DivisionSolve
Evaluate Reverse Polish NotationSolve
Excel Sheet Column NumberSolve
Find Minimum in Rotated Sorted Array IISolve
Find Original Array From Doubled ArraySolve
Find Pivot IndexSolve
Find Shortest Path with K HopsSolve
Find the Closest PalindromeSolve
Find the Longest Substring Containing Vowels in Even CountsSolve
Find the Winner of an Array GameSolve
Fizz BuzzSolve
Integer to RomanSolve
Is SubsequenceSolve
K Closest Points to OriginSolve
K-th Symbol in GrammarSolve
Kth Ancestor of a Tree NodeSolve
Kth Smallest Element in a Sorted MatrixSolve
Largest NumberSolve
Length of Longest Fibonacci SubsequenceSolve
Lexicographically Smallest String After Substring OperationSolve
LFU CacheSolve
Longest Duplicate SubstringSolve
Longest Increasing SubsequenceSolve
Longest Substring with At Most K Distinct CharactersSolve
Lowest Common Ancestor of a Binary TreeSolve
Maximum Average Subarray ISolve
Maximum Number of Events That Can Be AttendedSolve
Maximum Sum Circular SubarraySolve
Meeting Rooms IISolve
Meeting Rooms IIISolve
Merge Two Sorted ListsSolve
Minimum Cost to Reach City With DiscountsSolve
Minimum Insertion Steps to Make a String PalindromeSolve
Minimum Swaps to Make Strings EqualSolve
Missing NumberSolve
Monotone Increasing DigitsSolve
Next Greater Element ISolve
Next Greater Element IISolve
Non-overlapping IntervalsSolve
Parallel Courses IIISolve
Parsing A Boolean ExpressionSolve
Pascal's Triangle IISolve
Perfect SquaresSolve
PermutationsSolve
Permutations IISolve
Power of TwoSolve
Remove All Occurrences of a SubstringSolve
Remove CommentsSolve
Remove Duplicates from Sorted ArraySolve
Reorder ListSolve
Reorganize StringSolve
Restore IP AddressesSolve
Reverse Words in a StringSolve
Rotate ImageSolve
Shortest BridgeSolve
Shortest Path in Binary MatrixSolve
Simple Bank SystemSolve
Single NumberSolve
Single-Threaded CPUSolve
Smallest String With SwapsSolve
Snapshot ArraySolve
Split Array Largest SumSolve
Subarray Product Less Than KSolve
SubsetsSolve
Swap Nodes in PairsSolve
Text JustificationSolve
Top K Frequent WordsSolve
Tree DiameterSolve
TriangleSolve
Two Sum IV - Input is a BSTSolve
Ugly Number IISolve
Unique Paths IISolve
Unique Paths IIISolve
Valid AnagramSolve
Valid PalindromeSolve
Validate Binary Search TreeSolve
Word LadderSolve
Word Ladder IISolve