Goldman Sachs OA – Questions Asked

Posted
31 Mar 2026
295 reads

Summary

I completed the Goldman Sachs online assessment, which consisted of two medium‑difficulty coding questions.

How it went

Hey everyone! 👋

This platform has given me so much over the years - knowledge, confidence, opportunities, and a community that constantly pushes you to grow. From struggling with basic problems to finally cracking interviews, it’s been a journey I couldn’t have taken alone.

Now it feels like the right time to give back ❤️ If this helps even one person prepare better or feel less lost, it’ll be worth it.

OA Format

  • 2 coding questions
  • Time: 120 minutes

Question 1 – Matrix Special Elements [Medium]

Given a matrix, count the distinct elements that are either the minimum or maximum in their row or column.

Important constraint:

  • If any row or column has more than one minimum or more than one maximum, return -1.

Question 2 – Array Burst [Medium]

Given a sequence of characters and a burstLength, repeatedly remove any contiguous group whose size is ≥ burstLength.

Key details:

  • Entire group should be removed if size ≥ k
  • After removal, new adjacent groups may merge and trigger another burst
  • Continue until no more removals are possible

Example

Input

abcdeeeeeddcbfgfhhht k = 3

Process

eeeee → removed ddd → removed hhh → removed

Final Result

abccbfgft


If you’re preparing right now - keep going. It’s tough, but completely worth it. And when you make it, come back and help someone else too 🤝

Questions asked (2)

  1. 01

    Matrix Special Elements

    Data Structures & Algorithms · Medium

    Given a matrix, count the distinct elements that are either the minimum or maximum in their row or column.

    Important constraint:

    • If any row or column has more than one minimum or more than one maximum, return -1.
  2. 02

    Array Burst

    Data Structures & Algorithms · Medium

    Given a sequence of characters and a burstLength, repeatedly remove any contiguous group whose size is ≥ burstLength.

    Key details:

    • Entire group should be removed if size ≥ k.
    • After removal, new adjacent groups may merge and trigger another burst.
    • Continue until no more removals are possible.

    Example Input: abcdeeeeeddcbfgfhhht, k = 3 Process: remove groups eeee e, ddd, hhh Final Result: abccbfgft.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Goldman Sachs recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!