Goldman Sachs OA – Questions Asked
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)
Matrix Special Elements
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.
Array Burst
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.