Now practice all your interviews before giving the real one

( Goldman Sachs interview questions )

Goldman Sachs interview questions, and how to answer them.

15 questions candidates report from Goldman Sachs interviews, grouped by topic, with a short note on how to answer each kind. Then say your answers out loud in a practice interview.

5 minutes, no CV needed. A practice round, not Goldman Sachs's own.

What Goldman Sachs interviews ask, in our data

Our bank holds 142 coding questions that candidates report from Goldman Sachs interviews. The topics that come up most: math & bits (20), arrays & hashing (16), dynamic programming, 1-D (12) and two pointers (12). Of the 142 coding questions, 25 are easy, 103 medium and 14 hard.

Our data covers coding questions for Goldman Sachs; it says nothing about their other rounds, so we don't guess. These are practice questions based on what candidates report on public, community-kept lists, each written in our own words. RoundAlpha is not linked to Goldman Sachs.

Coding questions
142
Easy / medium / hard
25 / 103 / 14
Top topic
Math & bits
Page data updated
29 November 2026

( Questions )

15 Goldman Sachs questions to practise.

Two pointers

  1. 1

    Trapped RainwaterHard

    A row of bars stands side by side, each 1 unit wide; height[i] is the height of bar i. After a heavy rain, water settles in the dips between the bars.

  2. 2

    Biggest Water TankMedium

    A row of walls stands on flat ground, one metre apart; height[i] is the height of wall i.

Binary search

  1. 3

    Middle of Two Sorted ListsHard

    nums1 and nums2 are two lists of integers, each sorted from smallest to largest.

  2. 4

    Search a Rotated ListMedium

    nums started out as a list of different integers sorted from smallest to largest.

Arrays & hashing

  1. 5

    Lone Letter LocationEasy

    For a string s, return the zero-based index of its earliest character that occurs exactly once in the entire string.

  2. 6

    Group by LettersMedium

    Given a list of words, put words that are made of exactly the same letters, each used the same number of times, into the same group.

Sliding window

  1. 7

    Longest Unique StretchMedium

    Given a string s, return the length of the longest stretch of consecutive characters in which no character appears twice.

Intervals

  1. 8

    Merge RangesMedium

    You are given a list of ranges, each written as [start, end]. Merge every group of ranges that overlap or touch, and return the merged ranges sorted by their start.

Dynamic programming, 2-D

  1. 9

    Cheapest Corner PathMedium

    Given a grid with m rows and n columns containing non-negative integers, return the lowest sum of cell values along a route from the top-left cell to the bottom-right cell.

Dynamic programming, 1-D

  1. 10

    Ways to DecodeMedium

    A message made of capital letters was turned into digits by replacing each letter with its place in the alphabet — A with 1, B with 2, and so on up to Z with 26 — and writing the numbers one after another with…

Linked list

  1. 11

    Recently Used CacheMedium

    Build a cache that holds at most capacity keys and, once it is full, makes room by throwing out the key that was used longest ago.

Graphs

  1. 12

    Count IslandsMedium

    You are given a map of the sea as a grid of "1"s and "0"s: "1" is land and "0" is water. An island is a group of land cells joined up, down, left or right.

Math & bits

  1. 13

    Shrink Character RunsMedium

    An array chars contains characters. Encode every maximal run of consecutive equal characters directly in the original array.

  2. 14

    Check for Finite MotionMedium

    On an infinite plane, a robot begins at (0, 0), facing north. North increases y, south decreases y, east increases x, and west decreases x.

  3. 15

    Last Player StandingMedium

    Given two integers n and k, return the number of the player who wins the following game. The n players form a circle, labeled from 1 through n in clockwise order.

Want to write the code too? The Goldman Sachs list on our coding practice page runs your answer against hidden tests, in six languages.

Questions

Goldman Sachs interview: questions and answers

What coding questions does Goldman Sachs ask?

Our bank holds 142 coding questions that candidates report from Goldman Sachs interviews. The topics that come up most: math & bits (20), arrays & hashing (16), dynamic programming, 1-D (12) and two pointers (12). This page shows 15 of them, grouped by topic.

How hard are Goldman Sachs coding questions?

Of the 142 coding questions, 25 are easy, 103 medium and 14 hard. The level you meet depends on the role and your experience, so practise easy and medium ones until you can explain them out loud, then add hard ones.

Are these the real Goldman Sachs interview questions?

They are practice questions based on what candidates report from Goldman Sachs interviews on public, community-kept lists. Each one is written in our own words. RoundAlpha is not linked to Goldman Sachs, and no list can promise what a given interviewer will ask.

Can I practise a Goldman Sachs interview for free?

Yes. A new account you sign up for yourself gets one short free practice interview. Name Goldman Sachs as the company and the interviewer leans its questions toward that company. You can choose "No CV this time", so no CV is needed. You talk out loud and get a scored report at the end.

Read next

Ready when you are

Say it out loud once before it counts.

A short practice interview with Goldman Sachs named as the company, then a scored report on every answer.

5 minutes, no CV needed. A practice round, not Goldman Sachs's own.