GS

Goldman Sachs

100 questions tracked99 with solutions
🔍
Frequency scoreSorted highest → lowest frequency✓ Our Solution = we have a detailed walkthrough

Showing 100 of 100 questions

1
HardTrapping Rain Water✓ Our Solution
100
ArrayTwo PointersDynamic ProgrammingStack+1
LeetCode ↗65% acc.
2
HardMedian of Two Sorted Arrays✓ Our Solution
80
ArrayBinary SearchDivide and Conquer
LeetCode ↗44% acc.
3
EasyFirst Unique Character in a String✓ Our Solution
78
Hash TableStringQueueCounting
LeetCode ↗64% acc.
4
MediumFraction to Recurring Decimal✓ Our Solution
77
Hash TableMathString
LeetCode ↗26% acc.
5
EasyBest Time to Buy and Sell Stock✓ Our Solution
64
ArrayDynamic Programming
LeetCode ↗55% acc.
6
MediumNumber of Islands✓ Our Solution
64
ArrayDepth-First SearchBreadth-First SearchUnion Find+1
LeetCode ↗62% acc.
7
MediumMinimum Path Sum✓ Our Solution
62
ArrayDynamic ProgrammingMatrix
LeetCode ↗66% acc.
8
MediumString Compression✓ Our Solution
61
Two PointersString
LeetCode ↗58% acc.
9
EasyTwo Sum✓ Our Solution
60
ArrayHash Table
LeetCode ↗56% acc.
10
MediumLRU Cache✓ Our Solution
60
Hash TableLinked ListDesignDoubly-Linked List
LeetCode ↗45% acc.
11
MediumGroup Anagrams✓ Our Solution
59
ArrayHash TableStringSorting
LeetCode ↗71% acc.
12
MediumFind Minimum in Rotated Sorted Array✓ Our Solution
59
ArrayBinary Search
LeetCode ↗53% acc.
13
MediumContainer With Most Water✓ Our Solution
59
ArrayTwo PointersGreedy
LeetCode ↗58% acc.
14
MediumDecode Ways✓ Our Solution
56
StringDynamic Programming
LeetCode ↗37% acc.
15
MediumLongest Substring Without Repeating Characters✓ Our Solution
56
Hash TableStringSliding Window
LeetCode ↗37% acc.
16
MediumSearch in Rotated Sorted Array✓ Our Solution
56
ArrayBinary Search
LeetCode ↗43% acc.
17
MediumMinimize the Maximum of Two Arrays✓ Our Solution
54
MathBinary SearchNumber Theory
LeetCode ↗31% acc.
18
MediumBest Time to Buy and Sell Stock II✓ Our Solution
52
ArrayDynamic ProgrammingGreedy
LeetCode ↗70% acc.
19
MediumKth Largest Element in an Array✓ Our Solution
51
ArrayDivide and ConquerSortingHeap (Priority Queue)+1
LeetCode ↗68% acc.
20
HardValid Arrangement of Pairs✓ Our Solution
50
Depth-First SearchGraphEulerian Circuit
LeetCode ↗66% acc.
21
MediumMerge Intervals✓ Our Solution
49
ArraySorting
LeetCode ↗49% acc.
22
MediumConstruct Smallest Number From DI String✓ Our Solution
49
StringBacktrackingStackGreedy
LeetCode ↗86% acc.
23
MediumLongest Palindromic Substring✓ Our Solution
49
Two PointersStringDynamic Programming
LeetCode ↗36% acc.
24
EasyPower of Three✓ Our Solution
49
MathRecursion
LeetCode ↗48% acc.
25
MediumLongest Increasing Subsequence✓ Our Solution
49
ArrayBinary SearchDynamic Programming
LeetCode ↗58% acc.
26
MediumMaximum Subarray✓ Our Solution
49
ArrayDivide and ConquerDynamic Programming
LeetCode ↗52% acc.
27
MediumMinimum Cost Homecoming of a Robot in a Grid✓ Our Solution
47
ArrayGreedy
LeetCode ↗51% acc.
28
EasyValid Parentheses✓ Our Solution
47
StringStack
LeetCode ↗42% acc.
29
MediumJump Game✓ Our Solution
47
ArrayDynamic ProgrammingGreedy
LeetCode ↗39% acc.
30
HardCount Palindromic Subsequences✓ Our Solution
47
StringDynamic Programming
LeetCode ↗39% acc.
31
MediumRange Product Queries of Powers✓ Our Solution
47
ArrayBit ManipulationPrefix Sum
LeetCode ↗42% acc.
32
EasyKeep Multiplying Found Values by Two✓ Our Solution
46
ArrayHash TableSortingSimulation
LeetCode ↗71% acc.
33
MediumCount Number of Texts✓ Our Solution
46
Hash TableMathStringDynamic Programming
LeetCode ↗49% acc.
34
MediumFind All Good Indices✓ Our Solution
46
ArrayDynamic ProgrammingPrefix Sum
LeetCode ↗40% acc.
35
HardSliding Window Maximum✓ Our Solution
46
ArrayQueueSliding WindowHeap (Priority Queue)+1
LeetCode ↗48% acc.
36
MediumSuccessful Pairs of Spells and Potions✓ Our Solution
46
ArrayTwo PointersBinary SearchSorting
LeetCode ↗45% acc.
37
EasyDetermine if Two Events Have Conflict✓ Our Solution
46
ArrayString
LeetCode ↗52% acc.
38
MediumSearch a 2D Matrix✓ Our Solution
44
ArrayBinary SearchMatrix
LeetCode ↗52% acc.
39
MediumString to Integer (atoi)✓ Our Solution
44
String
LeetCode ↗19% acc.
40
MediumProduct of Array Except Self✓ Our Solution
44
ArrayPrefix Sum
LeetCode ↗68% acc.
41
MediumSubarray Sum Equals K✓ Our Solution
42
ArrayHash TablePrefix Sum
LeetCode ↗45% acc.
42
MediumHouse Robber✓ Our Solution
42
ArrayDynamic Programming
LeetCode ↗52% acc.
43
MediumPow(x, n)✓ Our Solution
42
MathRecursion
LeetCode ↗37% acc.
44
MediumWord Search✓ Our Solution
40
ArrayStringBacktrackingDepth-First Search+1
LeetCode ↗45% acc.
45
EasyLinked List Cycle✓ Our Solution
40
Hash TableLinked ListTwo Pointers
LeetCode ↗53% acc.
46
MediumNext Permutation✓ Our Solution
40
ArrayTwo Pointers
LeetCode ↗43% acc.
47
EasyPascal's Triangle✓ Our Solution
37
ArrayDynamic Programming
LeetCode ↗77% acc.
48
MediumFind Peak Element✓ Our Solution
37
ArrayBinary Search
LeetCode ↗47% acc.
49
EasyClimbing Stairs✓ Our Solution
37
MathDynamic ProgrammingMemoization
LeetCode ↗54% acc.
50
EasySqrt(x)✓ Our Solution
37
MathBinary Search
LeetCode ↗40% acc.
51
EasyMissing Number✓ Our Solution
37
ArrayHash TableMathBinary Search+2
LeetCode ↗70% acc.
52
MediumMinimum Size Subarray Sum✓ Our Solution
37
ArrayBinary SearchSliding WindowPrefix Sum
LeetCode ↗49% acc.
53
MediumInsert Delete GetRandom O(1)✓ Our Solution
37
ArrayHash TableMathDesign+1
LeetCode ↗55% acc.
54
MediumTop K Frequent Elements✓ Our Solution
34
ArrayHash TableDivide and ConquerSorting+4
LeetCode ↗65% acc.
55
MediumMaximum Product Subarray✓ Our Solution
34
ArrayDynamic Programming
LeetCode ↗35% acc.
56
MediumGas Station✓ Our Solution
34
ArrayGreedy
LeetCode ↗46% acc.
57
MediumMinimum Number of Arrows to Burst Balloons✓ Our Solution
34
ArrayGreedySorting
LeetCode ↗60% acc.
58
HardFind Median from Data Stream✓ Our Solution
30
Two PointersDesignSortingHeap (Priority Queue)+1
LeetCode ↗53% acc.
59
MediumMaximal Square✓ Our Solution
30
ArrayDynamic ProgrammingMatrix
LeetCode ↗49% acc.
60
MediumDecode String✓ Our Solution
30
StringStackRecursion
LeetCode ↗61% acc.
61
MediumMaximum XOR of Two Numbers in an Array✓ Our Solution
30
ArrayHash TableBit ManipulationTrie
LeetCode ↗53% acc.
62
EasyNext Greater Element I✓ Our Solution
30
ArrayHash TableStackMonotonic Stack
LeetCode ↗75% acc.
63
HardBest Time to Buy and Sell Stock IV✓ Our Solution
30
ArrayDynamic Programming
LeetCode ↗47% acc.
64
EasyPascal's Triangle II✓ Our Solution
30
ArrayDynamic Programming
LeetCode ↗66% acc.
65
MediumSet Matrix Zeroes✓ Our Solution
30
ArrayHash TableMatrix
LeetCode ↗61% acc.
66
MediumLetter Combinations of a Phone Number✓ Our Solution
30
Hash TableStringBacktracking
LeetCode ↗64% acc.
67
HardN-Queens✓ Our Solution
30
ArrayBacktracking
LeetCode ↗73% acc.
68
EasyMerge Two Sorted Lists✓ Our Solution
30
Linked ListRecursion
LeetCode ↗67% acc.
69
HardThe Skyline Problem✓ Our Solution
30
ArrayDivide and ConquerBinary Indexed TreeSegment Tree+3
LeetCode ↗44% acc.
70
MediumSpiral Matrix✓ Our Solution
30
ArrayMatrixSimulation
LeetCode ↗54% acc.
71
HardFirst Missing Positive✓ Our Solution
30
ArrayHash Table
LeetCode ↗41% acc.
72
MediumAdd Two Numbers✓ Our Solution
30
Linked ListMathRecursion
LeetCode ↗46% acc.
73
EasyRoman to Integer✓ Our Solution
30
Hash TableMathString
LeetCode ↗65% acc.
74
EasyCount Number of Pairs With Absolute Difference K✓ Our Solution
30
ArrayHash TableCounting
LeetCode ↗85% acc.
75
30
ArrayGreedy
LeetCode ↗47% acc.
76
MediumNext Greater Element III✓ Our Solution
26
MathTwo PointersString
LeetCode ↗35% acc.
77
MediumFraction Addition and Subtraction✓ Our Solution
26
MathStringSimulation
LeetCode ↗66% acc.
78
26
ArrayTwo PointersSorting
LeetCode ↗37% acc.
79
MediumPermutations✓ Our Solution
26
ArrayBacktracking
LeetCode ↗81% acc.
80
MediumAmount of Time for Binary Tree to Be Infected✓ Our Solution
26
Hash TableTreeDepth-First SearchBreadth-First Search+1
LeetCode ↗64% acc.
81
EasyReverse String✓ Our Solution
26
Two PointersString
LeetCode ↗80% acc.
82
MediumInteger to Roman✓ Our Solution
26
Hash TableMathString
LeetCode ↗69% acc.
83
MediumLongest Substring with At Most K Distinct Characters
26
Hash TableStringSliding Window
LeetCode ↗49% acc.
84
MediumPermutation in String✓ Our Solution
26
Hash TableTwo PointersStringSliding Window
LeetCode ↗47% acc.
85
MediumReorder List✓ Our Solution
26
Linked ListTwo PointersStackRecursion
LeetCode ↗63% acc.
86
EasyIntersection of Two Linked Lists✓ Our Solution
26
Hash TableLinked ListTwo Pointers
LeetCode ↗61% acc.
87
MediumFind the Duplicate Number✓ Our Solution
26
ArrayTwo PointersBinary SearchBit Manipulation
LeetCode ↗63% acc.
88
MediumLargest Number✓ Our Solution
26
ArrayStringGreedySorting
LeetCode ↗41% acc.
89
EasyValid Anagram✓ Our Solution
26
Hash TableStringSorting
LeetCode ↗67% acc.
90
MediumRotate Array✓ Our Solution
26
ArrayMathTwo Pointers
LeetCode ↗43% acc.
91
MediumRotate Image✓ Our Solution
26
ArrayMathMatrix
LeetCode ↗78% acc.
92
MediumJump Game II✓ Our Solution
19
ArrayDynamic ProgrammingGreedy
LeetCode ↗42% acc.
93
MediumValid Sudoku✓ Our Solution
19
ArrayHash TableMatrix
LeetCode ↗62% acc.
94
EasyContains Duplicate II✓ Our Solution
19
ArrayHash TableSliding Window
LeetCode ↗49% acc.
95
MediumUnique Paths✓ Our Solution
19
MathDynamic ProgrammingCombinatorics
LeetCode ↗66% acc.
96
EasyMerge Sorted Array✓ Our Solution
19
ArrayTwo PointersSorting
LeetCode ↗53% acc.
97
MediumQuery Kth Smallest Trimmed Number✓ Our Solution
19
ArrayStringDivide and ConquerSorting+3
LeetCode ↗46% acc.
98
MediumRemove Duplicate Letters✓ Our Solution
19
StringStackGreedyMonotonic Stack
LeetCode ↗51% acc.
99
MediumZigzag Conversion✓ Our Solution
19
String
LeetCode ↗52% acc.
100
MediumInterleaving String✓ Our Solution
19
StringDynamic Programming
LeetCode ↗42% acc.