InterviewLegend

Design & Data Structures

Alex Chen24 min readUpdated 392 real interview reports

One family of Goldman coding questions asks you to build a small piece of a system while the interviewer watches. The scope is one structure, never a whole service. Think a cache that forgets its stalest entry, a stack that hands back its smallest element in constant time, or a tally that rolls name-and-score records into one number per person. The work is modest in size and exact in execution. You pick the two structures that fit, wire them together, and keep every operation inside the time bound you claimed.

Two shapes cover almost all of it. The first is aggregation: records arrive keyed by some id, a student and a grade, and you group them and reduce each group to a single value. The second is a designed data structure, where one hash map is not enough and you pair it with a linked list or a second stack so that lookup and update both stay fast. A Premium question is the aggregation Goldman is known for. A Premium question is the designed structure it returns to most. Learn to see which of the two a prompt wants and the code that follows is short.

What's inside
  • 3 problems, worked step by step
  • about 24 min

Premium lessonGoldman Sachs interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · 30-day money-back guarantee

Had your Goldman Sachs interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Goldman Sachs interview guide

Know what Goldman Sachs asks before you walk in.

16 coding · 3 system design · 22 behavioral questions

Get Premium$49 a year · 30-day money-back guarantee
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.