HackTheRounds Interview Experiences
Goldman Sachs Summer Analyst OA Interview Experience (2026) - Damaged Toy, Encode/Decode, Maze BFS, Offer
Goldman Sachs Summer Analyst OA: 3 HackerRank problems including circular Josephus style distribution, cyclic key encoding, and bounded jump maze BFS. Full cred
By Anonymous ยท 2026-03-25
Background
I spent most of last summer quietly grinding HackerRank's Goldman problem set in the evenings because the Summer Analyst program was the single offer I actually wanted. I am a CS and math double major at a mid-tier target, interested in the Strats and Quant tech rotation. The OA was the gate: three problems, 75 minutes, all on HackerRank with the browser-lockdown proctor running. I cleared all three and converted to an offer, so I want to document exactly what showed up and how I approached each one.
Timeline
- First-round app submitted: mid-February
- OA link received: 6 days later, 72-hour window
- OA attempted (all 3 problems): same week
- Super Day invite: 5 business days after OA
- Super Day: 2.5 weeks after invite, 4 rounds virtual
- Offer call: 4 business days after Super Day
- Total: ~6 weeks.
OA Format (3 problems, 75 min, HackerRank)
Three coding problems in a single session. Scoring is per test case, partial credit is granted, and the problems are ordered by difficulty. The third one is where time pressure bites.
Problem 1: Find the Damaged Toy (circular distribution)
Problem: At a birthday party, N kids stand in a numbered circle from 1 to N . The host hands out T toys starting from kid D and continuing clockwise, wrapping from N back to 1 . The last toy is defective. Return the ID of the kid who receives the last toy.
This is a one-liner if you see it. The kid who gets the T-th toy, starting from D and going clockwise, is ((D - 1 + T - 1) mod N) + 1 . The tricky part is the two separate minus-ones: one to convert D to a 0-indexed offset, one because the first toy goes to D not to D+1.
I verified on the given example (N=5, T=2, D=1) by hand: toy 1 goes to kid 1, toy 2 goes to kid 2, so the answer is 2. The formula gives ((0 + 1) % 5) + 1 = 2 . Clean. No loop, just arithmetic, so constant time and space.
Practice it: [[problem/838?company=43|Direction Controller]]
Problem 2: Encode / Decode a Message
Problem: You are given a message string and a positive integer key. If the operation type is 1 (encode), expand each character by repeating it key[i] times, cycling through the digits of the key. If the operation type is 2 (decode), compress runs of the same character back using the key digits cyclically. If a run does not match the expected digit, return -1 .
This one looked simple but had two traps. First, the "key" is the integer treated as a digit sequence. If key is 213 and the message is "abc", then 'a' repeats 2 times, 'b' repeats 1 time, 'c' repeats 3 times: "aabccc". Second, the cyclic key must wrap correctly when the message is longer than the digit count.
Encode is a straight pass: convert the key to a digit list, then repeat each character by the next digit, wrapping the digit index with modulo. Decode is the mirror: scan the encoded string, count each run of the same character, and confirm the run length matches the next expected digit. Mismatch anywhere returns -1 .
The edge case I almost missed: if the encoded string ends mid-run, the length check still catches it because the partial run will not match the expected digit. I added a manual test for that before submitting. Both operations are O(n) where n is the encoded length.
Problem 3: Minimum Moves in a Maze (bounded-jump BFS)
Problem: You are given an n x m grid where 0 is empty and 1 is an obstacle. Start at (0, 0) , end at (n-1, m-1) . In a single move you can jump 1 to k cells in one of the four cardinal directions, provided every cell you jump over is empty. Return the minimum number of moves, or -1 if unreachable.
Standard BFS with a twist. Each move can cover up to k cells, so the neighbor generation inside BFS is not just the 4 adjacent cells; it is up to 4 k cells, one for each direction and each valid jump distance from 1 to k. You stop extending in a direction the moment you hit an obstacle, so the inner expansion is bounded by the straight-line empty corridor.
Maintain a 2D dist grid, push the source, pop and expand. For each of the four directions scan outward up to k cells, stopping at a wall or grid edge, and relaxing any unvisited cell with the current distance plus one. Complexity is O(n m k) in the worst case.
The subtle point: you must break the inner step loop as soon as you hit an obstacle, because the problem requires every jumped-over cell to be empty. A continue would let you skip over walls, which is wrong. I have seen candidates score 60% on this problem for exactly that bug.
Practice it: [[problem/842?company=43|Chess Bishop Minimum Moves]]
I passed all three problems with full credit. Finished Problem 1 in 5 minutes, Problem 2 in 20, Problem 3 in 35, and used the last 15 to clean up and add manual test cases.
Result
Super Day was four rounds: two coding, one design-lite, one behavioral. The offer call came four business days after. Summer Analyst in the Strats division, New York. Base was in line with the published range and the signing bonus was on the upper end.
Tips
- Memorize the circular-index formula. `((start - 1 + offset) mod N) + 1` appears in Goldman problems almost every cycle. Josephus-style problems are a recruiter favorite because they are short and the off-by-ones eat unprepared candidates alive.
- For cyclic-key encoding problems, write the digit list explicitly. Do not try to do `% 10` and integer division in a loop. `[int(d) for d in str(key)]` is a two-line primitive that makes the rest of the code obvious.
- Bounded-jump BFS uses `break`, not `continue`. This is the single bug that costs candidates partial credit on Problem 3. Say "if I hit an obstacle in direction d, I must stop scanning direction d for this move" out loud before coding.
- Verify the proctor setup before starting the timer. HackerRank's lockdown browser can crash if you have a second monitor plugged in, and Goldman's OA does not pause. Unplug everything before you click Start.
- The OA timer is tight but fair. 75 minutes for 3 problems means ~20 minutes of coding each plus 15 minutes of buffer. If Problem 3 has you stuck at the 50-minute mark, submit what you have and move to manual test cases. Partial credit on Problem 3 is better than zero while you debug.
- Goldman weights clarity in variable names. I had one bug on Problem 2 where I used `k` for both the key and the inner loop counter. Rename. Their graders read submissions, and readable code gets treated as "working solution with a small typo" rather than "wrong answer."