goldman sachs logo
Goldman Sachs· Analyst

Interview Experience Goldman Sachs | Analyst | Coderpad round

Result
Ongoing
Posted
29 Sept 2025
434 reads

Summary

I had a Coderpad round for an Analyst position at Goldman Sachs where I was able to solve two algorithmic questions, though I received some hints on the second one. The verdict is still pending.

How it went

I joined the Coderpad round for an Analyst position at Goldman Sachs. The interviewer started right on time with introductions. I was asked two specific questions. I managed to solve both of them. For the second question, the interviewer provided a couple of hints when I was heading in the wrong direction, which I thankfully picked up and used to solve the problem. I am currently awaiting the final verdict.

Questions asked (2)

  1. 01

    Find Unique Substrings of Length 'len'

    Data Structures & Algorithms

    Given a string, find all the unique substrings of a specified length 'len'. As a follow-up, I was asked to handle multiple edge cases through exception handling.

  2. 02

    Find Root of Largest Tree in a Forest

    Data Structures & Algorithms

    Given a forest (one or more disconnected trees), find the root of the largest tree and return its Id. If there are multiple such roots, return the smallest Id among them. I was provided with a map immediateParent, containing key-value pairs indicating child -> parent relationship. The key is the child and the value is its corresponding immediate parent.

    Constraints:

    • Child cannot have more than one immediate parent.
    • Parent can have more than one immediate child.
    • The given key-value pair forms a well-formed forest (a tree of n nodes will have n-1 edges).
    Example:
    Input:
    { { 1 -> 2 }, { 3 -> 4 } }
    Expected output: 2

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!