11.26 Goldman Sachs 26NG SDE OA |Difficulty is not low, but you can pass with a steady mindset

197 Views

I've actually done Goldman Sachs OA quite a few times, and each time it's been a bit of a "quieter side".
This time 11.26 Goldman Sachs 26NG SDE OA , and overall it's still one of those things: the title isn't intimidating, but the writing isn't clean enough to really roll over.

The whole set was: 2 programming, 8 multiple choice questions, the multiple choice questions were a bit tricky but manageable; it was the two coding questions that really opened up the gap.

11.26 Goldman Sachs 26NG SDE OA |Difficulty is not low, but you can pass with a steady mindset

Coding Question 1

Q1: Sliding Window Log Transmission Counter

Given a stream of log events, each event has a timestamp and a tag.
You need to calculate for each new log event how many previous events with the same tag fall within a fixed sliding time window.
The window size is W.
Return the total accumulated transmission count across all logs.
Old events falling out of the window should be removed efficiently.

Analyze the ideas

This question is all about how quickly you can build the structure of **"sliding window + multi-tabbed queue "**.
If you write it as a brute force scanning array, Goldman Sachs just makes you TLE.

The most stable architecture is:

  1. A global queue.
    • Used to record the chronological order of all logs
    • Convenience O(1) Remove Timeout Event
  2. A dictionary:tag → deque
    • Maintains only the same labeled timestamp
    • Avoid scanning the entire history list
  3. For each log (t, tag):
    • Remove this tag from the queue t - W Previous timestamps
    • The remaining length of the queue is the "number of times the same label is used in the window".
    • Add to final result
    • Put in the current timestamp.

This structure is a "very engineered" solution and is the optimal answer for the Goldman Sachs style.

Coding Question 2

Q2: Maximize Lock Value Based on GCD Rules

You are given an integer array A And an integer m.
Find an integer T (within a valid range related to m) that maximizes a custom lock value defined by the following rules.
For each element ai in the array, compute gcd(t, ai).
If gcd(t, ai) ! = 1It contributes to the score.
Special conditions apply when all gcd values equal 1, or when T already appears in A.
Return the maximum achievable lock value.

Analyze the ideas

Although it looks like a "pseudo-system design question", it is:
Mathematical simulation + rational enumeration + gcd judgment + handling boundary conditions.

The safe writing style is as follows:

Enumeration range

T The effective range is:

t ∈ [max(1, m - n), m]

This is to avoid meaningless t affecting the complexity.

for each t:

  1. Iterate over the array A
    • gcd(t, ai) ! = 1 → Credited contribution
  2. If all gcd = 1 → processed according to topic rules (usually lock value cleared to zero or base value given)
  3. If t is in a → to additionally add/subtract score (as required in the original question)
  4. Update Maximum Lock Value

What's the difficulty?

  • The special case where gcd is all 1s is easy to miss.
  • t It's not easy to remember what to do with an array.
  • Enumeration intervals that are written incorrectly will simply TLE or WA

But the overall difficulty:
Simple in structure, but dense in detail.

Overall experience: This Goldman Sachs OA is a "war of details".

My biggest feeling from doing it:

① It doesn't test fancy work, but places great emphasis on code structure.

The person who writes a messy first question is basically a sure-fire loser.
The elements of sliding windows, queues, and dictionaries must be combined mentally.

② Unexpectedly high demand for mathematical intuition

The second question can actually be written to explode, but as soon as you gcd and enumeration ranges are figured out, the difficulty drops off a notch immediately.

③ The multiple choice questions are a little harder than most banks

It's not a giveaway type, there will be a mix of probability, logic, and array complexity extrapolation like this.

The overall difficulty is not so hard as to discourage, but it is certainly "the kind of thing you can easily fall into without preparation".

Want to stabilize an OA like Goldman Sachs / JPMorgan / Linen?

This time, I took the students through the Goldman Sachs OA, and the biggest feeling is still - being able to write, writing fast, and writing steadily is the winning point.
But what most students get stuck on is not the knowledge, but the rhythm of the scene, a sudden brain freeze, or an explosion of boundary condition patches.

This is also Programhelp most commonly solved problem.

We don't offer that "violence on the plane," but rather:

  • Full on-line assistance without traces (dual ToDesk/voice-prompted routes)
  • The scene to help you straighten out the solution, no need to panic, no need to mess up the logic
  • On-the-spot optimization of code structure to reduce low-level bugs
  • Complex questions give "key glance hints" to make sure you don't get lost in the branches.
  • All test cases do not run = no charge

If you are preparing for bank/quant/big factory OA recently, and don't want to waste your time on stepping on the pit again and again, please feel free to ask. We've run thousands of OA's with you, and we'll tell you where to rush, where to stabilize, and where to just skip for an efficient strategy.

author avatar
Jory Wang Amazon Senior Software Development Engineer
Amazon senior engineer, focusing on the research and development of infrastructure core systems, with rich practical experience in system scalability, reliability and cost optimization. Currently focusing on FAANG SDE interview coaching, helping 30+ candidates successfully obtain L5/L6 Offers within one year.
END