Goldman Coderpad Interview experience

Posted
2 Jun 2025
355 reads

Summary

I had a Coderpad interview at Goldman Sachs involving two coding problems. I struggled with the first problem and encountered technical difficulties during the second, which prevented me from completing it.

How it went

I was asked two questions during my Goldman Coderpad interview. For Q1, I discussed it a lot but was unable to come up with a solution. For Q2, I moved to it when only 10 minutes were left. A power cut occurred at my end, and when I re-joined, the interviewer asked me to return to Q1.

Questions asked (2)

  1. 01

    Hermione's Cheat Sheet Encoding

    Data Structures & Algorithms

    Hermione is preparing a cheat-sheet for her final exam in Potions class. To create a potion, one must combine ingredients in a specific order, any of which may be repeated.

    As an example, consider the following potion which uses 4 distinct ingredients (A,B,C,D) in 11 steps: A, B, A, B, C, A, B, A, B, C, D

    Hermione realizes she can save tremendous space on her cheat-sheet by introducing a special instruction, '*', which means "repeat from the beginning".

    Using these optimizations, Hermione is able to encode the potion above using only 6 characters: A,B,* ,C,*,D

    Your job is to write a function that takes as input an un-encoded potion and returns the minimum number of characters required to encode the potion on Hermione's Cheat Sheet.

  2. 02

    Rock Collector Optimal Path

    Data Structures & Algorithms

    You are an avid rock collector who lives in southern California. Some rare and desirable rocks just became available in New York, so you are planning a cross-country road trip. There are several other rare rocks that you could pick up along the way. You have been given a grid filled with numbers, representing the number of rare rocks available in various cities across the country. Your objective is to find the optimal path from So_Cal to New_York that would allow you to accumulate the most rocks along the way.
    Note: You can only travel either north (up) or east (right).

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!