All company sheets
Goldman Sachs DSA interview questions
58 problems to practise before your Goldman Sachs online test or coding round. Most widely asked first.
58
Questions
16
Easy
28
Medium
14
Hard
Commonly reported. Problems candidates often report from this company’s coding rounds. These are Astra’s own tags, not an official question list.
Goldman Sachs is hiring · 21 open roles on Astra right nowView roles58 questions
- 1
Best Time to Buy and Sell Stock
EasyArrayTagged at 7 companies - 2
Find Number of Ways to Climb Stairs
EasyRecursionTagged at 7 companies - 3
Find Smallest Letter Greater Than Target
EasyBinary SearchTagged at 7 companies - 4
Implement Standard Binary Search Recursively
EasyBinary SearchTagged at 7 companies - 5
Find the Single Number (Appears Once, Others Twice)
EasyArrayTagged at 7 companies - 6
Sort an Array of Squares of a Sorted Array
EasyArrayTagged at 7 companies - 7
Contains Duplicate II
EasySliding WindowTagged at 7 companies - 8
Find Minimum in Rotated Sorted Array
MediumArrayTagged at 7 companies - 9
Maximum Product Subarray
MediumArrayTagged at 7 companies - 10
Search a 2D Matrix
MediumArrayTagged at 7 companies - 11
Generate All Permutations of a List
MediumRecursionTagged at 7 companies - 12
Find Minimum Time to Complete All Trips
MediumBinary SearchTagged at 7 companies - 13
Generate All Combinations that Sum to a Target
MediumArrayTagged at 7 companies - 14
Generate All Combinations of Size K from N Numbers
MediumArrayTagged at 7 companies - 15
Find Minimum Number of Arrows to Burst Balloons
MediumArrayTagged at 7 companies - 16
Chrome Tab History Unique Domains
MediumSliding WindowTagged at 7 companies - 17
Database Primary Key Collision
MediumTwo PointersTagged at 7 companies - 18
Same Tree
EasyTreeTagged at 6 companies - 19
Longest Palindrome
EasyStringTagged at 6 companies - 20
Remove All Adjacent Duplicates from a String
EasyStack and QueueTagged at 6 companies - 21
Implement a Stack Data Structure Using a Single Queue
EasyStack and QueueTagged at 6 companies - 22
Find the Middle of a Singly Linked List
EasyLinkedListTagged at 6 companies - 23
Delete Duplicates from a Sorted Doubly Linked List
EasyLinkedListTagged at 6 companies - 24
Count All Possible Root-to-Leaf Paths in a Generic Tree
EasyTreeTagged at 6 companies - 25
Max Sum of Two Non-Overlapping Subarrays
MediumDPTagged at 6 companies - 26
Predict the Winner of the Dota2 Senate Game
MediumStack and QueueTagged at 6 companies - 27
Swap Every Two Adjacent Nodes Iteratively
MediumLinkedListTagged at 6 companies - 28
Find the Duplicate Number in an Array (Cycle Detection Method)
MediumLinkedListTagged at 6 companies - 29
Delete a Node in a Linked List with O(1) Time Complexity
MediumLinkedListTagged at 6 companies - 30
Implement a Basic Circular Linked List
MediumLinkedListTagged at 6 companies - 31
Find Pairs with a Given Sum in a Doubly Linked List
MediumLinkedListTagged at 6 companies - 32
Implement a Trie (Prefix Tree) - Search
MediumTreeTagged at 6 companies - 33
Find the Kth Largest Element in an Array (Heap Method)
MediumTreeTagged at 6 companies - 34
Find the Number of Islands in a Grid (DFS)
MediumTreeTagged at 6 companies - 35
Clone an Undirected Graph (DFS/BFS)
MediumTreeTagged at 6 companies - 36
Reorganize String to Avoid Adjacent Duplicates
MediumStringTagged at 6 companies - 37
Compare Two Version Numbers (String Parsing)
MediumStringTagged at 6 companies - 38
Trapping Rain Water
HardArrayTagged at 6 companies - 39
Jump Game II
HardGreedyTagged at 6 companies - 40
Solve the N-Queens Puzzle
HardRecursionTagged at 6 companies - 41
Solve the Sudoku Puzzle Using Backtracking
HardRecursionTagged at 6 companies - 42
Find the Kth Smallest Number in a Multiplication Table
HardBinary SearchTagged at 6 companies - 43
Find Maximum Running Time of N Computers
HardBinary SearchTagged at 6 companies - 44
Find the First Missing Positive Integer
HardArrayTagged at 6 companies - 45
Data Lake Capacity Calculator
HardTwo PointersTagged at 6 companies - 46
Sliding Window Maximum
HardSliding WindowTagged at 6 companies - 47
Detecting Edge and Vertex Count
EasyGraphTagged at 5 companies - 48
Convert Edge List to Adjacency List
EasyGraphTagged at 5 companies - 49
Clone Graph
MediumGraphTagged at 5 companies - 50
Design an In-Memory File System
MediumDesignTagged at 5 companies - 51
Course Schedule (Detect Cycle in DAG)
MediumGraphTagged at 5 companies - 52
Shortest Path in Directed Acyclic Graph
MediumGraphTagged at 5 companies - 53
Excel Circular Reference Checker
MediumGraphTagged at 5 companies - 54
Binary Tree Maximum Path Sum
HardTreeTagged at 5 companies - 55
Find the Largest Rectangle Area in a Histogram
HardStack and QueueTagged at 5 companies - 56
Find All Words in a 2D Board (Trie + DFS)
HardTreeTagged at 5 companies - 57
Find the Median from a Continuous Data Stream (Two Heaps)
HardTreeTagged at 5 companies - 58
Word Ladder
HardGraphTagged at 3 companies