Goldman Sachs OA – Questions Asked

goldman sachs logo
goldman sachs
March 31, 2026 · 0 reads

Summary

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

Full Experience

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 🤝

Interview Questions (2)

1.

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.

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.

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

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