HackTheRounds Interview Experiences
Goldman Sachs Software Engineer Interview Experience (2026) - CoderPad Area of Squares & Longest Subarray
Goldman Sachs CoderPad loop: count squares in a grid, longest subarray with sum at most k, a 9 question math block covering probability and linear algebra, and
By Anonymous ยท 2026-03-18
Background
Goldman has a reputation for grinding candidates on detail, and after going through their CoderPad loop I can confirm it is earned. I am a final-year masters student applying for the 2026 Summer Analyst technology track, and I went in with about a year of backend intern experience plus a referral from a Strats alum. The CoderPad round was the first technical filter after the recruiter call, and the process continued with a Hirevue behavioral and a math multiple choice section that honestly felt more like a take-home quant screen than an OA.
Timeline
- Applied through campus referral: early February
- Recruiter call (30 min): one week later
- CoderPad OA link: same week, 5-day window
- CoderPad attempted: next afternoon
- Math multiple choice block (same session): 40 minutes right after coding
- Hirevue behavioral invite: 4 days after CoderPad
- Hirevue submitted: 6 days after invite
- Status: waiting on VO invite
Total so far: 3 weeks.
OA on CoderPad (2 coding, 55 minutes)
The coding portion was administered on CoderPad with proctoring turned on. Two problems, both scoped small enough to finish cleanly but with gotchas on the edges. Goldman is less interested in exotic algorithms and more interested in whether you handle the small-n cases and the off-by-one traps without flinching.
Problem 1: Count all squares inside a grid
Problem: Given a grid with row rows and col columns, and a list of queries where each query is [r, c] , return for each query the total number of axis-aligned squares of side length a (for 1 <= a <= min(r, c) ) that fit inside an r x c grid.
I stared at this for a minute and almost reached for a DP. Then I drew a 3x3 grid on the CoderPad scratchpad and counted manually. For a side length a , the top-left corner of the square can sit at any (i, j) with i + a <= r and j + a <= c . That gives (r - a + 1) (c - a + 1) placements per side length. Sum over all a from 1 to min(r, c) and you are done.
For each query in the batch I computed this in O(min(r, c)) time. The interviewer asked if I could do it in O(1) per query. You can, with a closed-form polynomial in r and c , but I chose not to go there under time pressure. The linear answer was accepted.
Practice it: [[problem/839?company=43|Transaction Segments]]
Problem 2: Longest subarray with sum at most k
Problem: Given an array of non-negative integers and a target k , return the length of the longest contiguous subarray whose sum is less than or equal to k .
Standard two-pointer sliding window. Because the array is non-negative, expanding the window never decreases the sum and shrinking from the left never increases it, so the window is monotone. I walked through the invariant out loud before touching the keyboard: grow the right pointer adding into a running sum, shrink from the left whenever the running sum exceeds k, and track the best window length across the scan. O(n) time, O(1) space.
The follow up was what changes if negatives are allowed. I said the sliding window breaks, and you fall back to prefix sums plus a monotonic deque, which I walked through verbally without coding.
Practice it: [[problem/148?company=43|Longest Substring Without Repeating Characters]]
Math Multiple Choice (9 questions, 40 min)
Goldman dropped nine math questions right after the coding. This is not optional and it is not a tiebreaker. People who bomb this block do not advance. Content was a mix of probability, linear algebra, and calculus:
- Two dice games. One involved a 5-5 tie with roll values giving points to different players, asking for the win probability from tie. The other had a reroll rule on a 1.
- A probability puzzle: 5 poker cards, 3 are aces, find the probability that exactly 4 are aces. Stated as written this is impossible, which is the test. You have to flag the premise.
- Series with an integral definition, find the general term.
- Derivative of a definite integral with variable bounds (Leibniz rule territory).
- Determine whether a 3x3 linear system is consistent and has a unique solution.
- A path integral over a parametric curve.
- Three algebra statements involving eigenvalues, determinants, and the identity matrix: true or false.
- Sum of 100 iid Bernoulli variables with p = 0.5, probability that the sum is below 60 (CLT with continuity correction).
If you have not touched linear algebra or probability in a year, do not take Goldman's OA blind. I brushed up on expected value and normal approximation the day before and it saved me on at least three questions.
Hirevue (6 questions, 45 sec prep, 2 min answer)
Goldman's Hirevue was tight. Six questions, a 45-second prep window per question, and a 2-minute cap on the answer. No retakes on the later questions.
- Walk through your resume.
- Working with someone who was not pulling their weight. What did you do?
- A high-challenge goal someone else said you could not hit.
- A time you turned down a project due to conflict.
- An individual project that bans teamwork, and a classmate offers to help anyway.
- How do you debug?
The debug question is the one candidates underestimate. I talked about hypothesis-driven debugging: form a theory, design a minimal test, disprove it fast, move on. That is what a desk Strat actually does when a pricing number looks wrong, and I framed it that way.
Result
Still waiting on the VO invite at time of writing. The recruiter said decisions go out in two batches, so I may hear back in another week.
Tips
- Draw on the CoderPad whiteboard for counting problems. The Problem 1 formula is obvious once you draw a 3x3 grid. It is invisible if you try to derive it in your head.
- Verify the sliding window invariant before coding. For Problem 2, explicitly say "all elements are non-negative, so the prefix sum is monotone." That one sentence tells the interviewer you know why the technique applies and not just the pattern.
- Do not skip the math block. Goldman weights probability and linear algebra because Strats work is half quant. If your last math class was three years ago, spend a weekend on normal approximation, expected value, eigenvalue intuition, and Leibniz differentiation. That is the exact surface area they test.
- On the Hirevue, prepare the resume walkthrough as a 90-second script. Time yourself. Cut filler. The other five questions will blow past 2 minutes if your opener runs long.
- For the debug question, give a concrete bug story from real work. Generic answers about "using print statements" get a lukewarm read. A story about narrowing a race condition from 200 lines of logs to a single lock contention is what they want.
- Clarify the premise when a math question looks impossible. The "4 aces out of 5 cards when only 3 are aces" question rewards candidates who flag that the event has probability zero, rather than guessing a fraction.