GOLDMAN SACHS · CODING QUESTIONS

Goldman Sachs coding interview questions

The data structures and algorithms questions candidates report from Goldman Sachs interviews, linked to AlgoRung problems with an editor, hidden tests, an animated walkthrough and solutions in four languages. Most asked topics: Arrays & Hashing, Dynamic Programming, Binary Search, Heaps.

From public candidate reports and Goldman Sachs's careers pages, checked November 2026. Processes vary by team. AlgoRung is not affiliated with Goldman Sachs.

All 14 reported Goldman Sachs coding questions

Difficulty
Topic
14 questions
  1. Trapping Rain Water Hard Arrays & Hashing also Amazon, Microsoft, Salesforce +1
  2. LRU Cache Medium Design Data Structures also Amazon, Microsoft, Apple +4
  3. Decode Ways Medium Dynamic Programming
  4. Number of Islands Medium Graphs also Amazon, Microsoft, Meta +1
  5. Coin Change Medium Dynamic Programming also Google, Airbnb, Salesforce
  6. Container With Most Water Medium Arrays & Hashing also Microsoft
  7. Koko Eating Bananas Medium Binary Search also Amazon
  8. Burst Balloons Hard Dynamic Programming
  9. Kth Largest Element in a Stream Easy Heaps
  10. Kth Smallest Element in a BST Medium Trees & BST
  11. Top K Frequent Words Medium Heaps also Amazon
  12. Longest Palindromic Subsequence Medium Dynamic Programming also LinkedIn
  13. 0 - 1 Knapsack Problem Medium Dynamic Programming also Flipkart
  14. Implement Queue using Stacks Easy Stack also Walmart Global Tech
Also reported, not on AlgoRung yet (2)

High Five · Predict the Winner

How the coding round is scored · The online assessment

Questions people ask

What coding questions does Goldman Sachs ask?

Candidates most often report Trapping Rain Water, LRU Cache, Decode Ways, Number of Islands, Coin Change. The full list of 14 reported questions is on this page, each linked to a practice problem with solutions.

Which topics should I study for the Goldman Sachs coding interview?

arrays and strings, two pointers, sliding window, dynamic programming, binary search, graphs. A 45 to 60 minute live interview where you solve one or two data-structures-and-algorithms problems while explaining your thinking. Interviewers score problem solving, code quality, testing and communication.

How hard are Goldman Sachs coding questions?

Of the reported questions on AlgoRung, 2 are easy, 10 medium and 2 hard. Expect mostly medium problems, with follow-ups that change a constraint.

Coding questions at other companies

Coding questions across all companies · Behavioral questions