Goldman Sachs Software Engineer Interview Experience — Two-Hour Online Assessment with Two Problems

Goldman Sachs·Software Engineer·Dec 2025
Online Assessmentmedium

2 hours to solve two problems:

  1. Transaction Segments

Given an array transactionValues of length n, where transactionValues[i] is the transaction amount at time i.

Count the number of contiguous subarrays that are strictly increasing and have length exactly k.

Strictly increasing means: transactionValues[i] < transactionValues[i+1] < ... < transactionValues[i+k-1], i.e., every element must be strictly greater than the one before it.

  1. Efficient Tasks

Given an array difficulty of length n, where difficulty[i] is the difficulty of the i-th software module.

All modules must be assigned to 3 servers, subject to:

  • Each server must get at least one module
  • Each module is assigned to exactly one server

After the assignment, pick one module from each server (any module) and compute:

|d1 - d2| + |d2 - d3|

where d1, d2, d3 are the difficulties of the chosen modules from the three servers respectively.

The task: over all valid ways of assigning modules to the three servers, and for each assignment considering all choices of one module per server that minimize the formula, find the maximum of these minimum values.

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Goldman Sachs
Role
Software Engineer
Rounds
Online Assessment
Difficulty
medium
Interview date
Dec 2025
Questions from this interview
1 question

Real Goldman Sachs interview experiences

First-hand reports from Goldman Sachs candidates — the rounds, the questions they were asked, and how it went.

All 6 Goldman Sachs interview experiences