Goldman Sachs Coding Interview Questions (2026 Guide)

By DSA Prep Team · February 15, 2026 · 15 min read · Data: 325 verified questions
Goldman Sachs interviews feel different from pure tech companies. There's more math, more optimization, and more finance-flavored problem statements β€” but under the hood, it's still the same core DSA patterns.

This guide breaks down 325 real Goldman Sachs interview questions: which patterns dominate, the exact difficulty mix, the top 20 problems you should solve right now, and a focused 30-day plan to get you ready.

πŸ“‹ Table of Contents

Overview: What Goldman Sachs Actually Asks

Based on 325 real interview questions from Goldman Sachs, here's what you need to know:

Difficulty Breakdown:

Easy:   24% (77 questions)
Medium: 63% (206 questions)
Hard:   13% (42 questions)

πŸ’‘ Key Insight

Goldman Sachs is heavily Medium-weighted at 63%, with a relatively low Hard share at 13%, which means consistent performance on medium problems matters more than mastering rare brain-teasers.

Top 10 Patterns Asked at Goldman Sachs

RankPatternFrequencyQuestions
1Array59.1%192
2String29.8%97
3Hash Table25.5%83
4Dynamic Programming22.5%73
5Math14.5%47
6Sorting13.5%44
7Two Pointers13.2%43
8Binary Search11.4%37
9Greedy9.5%31
10Matrix8.6%28

Pattern Strategy

Top 20 Goldman Sachs Interview Questions

The most frequently asked and recent problems from Goldman Sachs, grouped by difficulty:

🟒 Easy

#ProblemPatternsLink
1 High Five Array, Hash Table, Sorting LeetCode β†’
2 First Unique Character in a String Hash Table, String, Queue LeetCode β†’
3 Robot Return to Origin String, Simulation LeetCode β†’

🟑 Medium

#ProblemPatternsLink
1 Fraction to Recurring Decimal Hash Table, Math, String LeetCode β†’
2 Minimum Path Sum Array, Dynamic Programming, Matrix LeetCode β†’
3 Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold Array, Sliding Window LeetCode β†’
4 Car Pooling Array, Sorting, Heap LeetCode β†’
5 Number of Islands Array, DFS, BFS LeetCode β†’
6 Longest Substring Without Repeating Characters Hash Table, String, Sliding Window LeetCode β†’
7 Container With Most Water Array, Two Pointers, Greedy LeetCode β†’
8 Find the Minimum Amount of Time to Brew Potions Array, Binary Search LeetCode β†’

πŸ”΄ Hard

#ProblemPatternsLink
1 Trapping Rain Water Array, Two Pointers, Dynamic Programming LeetCode β†’
2 Median of Two Sorted Arrays Array, Binary Search, Divide and Conquer LeetCode β†’

30-Day Goldman Sachs Prep Plan

Week 1–2 Core Patterns (Focus on Top 3)

Week 3 Mixed Difficulty Practice

Week 4 Mock Interviews & Hard Problems

Self-Assessment β€” by end of Week 4 you should:

What Makes Goldman Sachs Interviews Unique

πŸ“ˆ Finance Domain Context

Many questions come wrapped in trading, risk, or portfolio management stories, so being comfortable with basic financial terminology makes it easier to map the narrative to a clean DSA model.

βž— Strong Math & Probability Flavor

Expect more combinatorics, probability, and numeric reasoning than at most big tech firms, especially for quant-leaning or trading-adjacent roles.

⚑ Optimization Really Matters

Because finance systems care about latency and throughput, interviewers pay extra attention to time complexity and constant factors, and often push you beyond the first working solution.

🧭 Ethics, Pressure, and Fit

Behavioral rounds test how you act under pressure and how you think about responsibility and ethics in high-stakes environments, so prepare STAR stories around teamwork, pressure, and integrity.

How to Track Your Goldman Sachs Prep with DSAPrep.dev

DSAPrep.dev Goldman Sachs filter view

Step 1: Filter by Company

Step 2: Track Pattern Coverage

Step 3: Schedule Reviews

Step 4: Mock Interview Mode

DSAPrep.dev leetcode spaced repetition tracker dashboard

Common Mistakes in Goldman Sachs Prep

⚠️ Mistake 1: Ignoring Math-Heavy Problems

Why it fails: Goldman Sachs leans more on math, probability, and numeric edge cases than typical big tech interviews.

Better: Mix in problems that involve fractions, precision, rounding, and numeric overflow so you are comfortable with the math layer on top of DSA.

⚠️ Mistake 2: Stopping at the First O(n²) Solution

Why it fails: Finance systems care about micro-optimizations, and interviewers expect you to push toward O(n log n) or O(n) where possible.

Better: After every solution, ask "Can I precompute? Can I sort once? Can I use a hash map or prefix sum?" and propose an optimized variant, even if you do not fully implement it.

⚠️ Mistake 3: No Spaced Repetition

Why it fails: Solving 50 problems once is less useful than solving 25 problems and revisiting them 3–5 times before interview day.

Better: Use DSAPrep.dev to reschedule Goldman Sachs questions so pattern recognition and numeric reasoning stay fresh.

Conclusion: Your Goldman Sachs Interview Roadmap

Today

This Week

This Month

πŸš€ Start Today

You will be comfortable with finance-flavored questions, confident with math-heavy logic, and fast at optimizing real-world DSA problems β€” exactly what Goldman Sachs looks for.

β†’ Start Tracking Goldman Sachs Prep on DSAPrep.dev (Free)