DEV Community

Cover image for Goldman Sachs 2026 SDE Intern OA Experience | HackerRank Coding + Logic Test Breakdown
net programhelp
net programhelp

Posted on

Goldman Sachs 2026 SDE Intern OA Experience | HackerRank Coding + Logic Test Breakdown

I recently completed the Goldman Sachs 2026 Summer SDE Intern Online Assessment. While the details were still fresh, I decided to document the full experience—including the test format, question distribution, and two representative problems—to help future candidates better understand what to expect.

Overall difficulty this year felt moderate. It was not as difficult as many online discussions suggest, but success depends heavily on handling edge cases, managing time effectively, and being familiar with common problem patterns. Several questions look straightforward at first glance, but missing a boundary condition can easily cost valuable points. Simply relying on random practice problems is not enough—focused preparation on high-frequency question types is much more effective.

OA Platform and Structure

The Goldman Sachs SDE Intern OA was hosted on HackerRank. Unlike previous years where questions were randomly generated, candidates this year were assigned one of two fixed test formats based on the information submitted during the application process.

Different candidates may receive slightly different versions, but the overall structure falls into two common patterns.

Pattern 1: 120-Minute Pure Coding Test

This version consists entirely of algorithmic coding problems.

  • 3–4 coding questions
  • Difficulty roughly equivalent to LeetCode Medium
  • No additional logic or math questions

The time pressure is relatively high. On average, each problem has about 30–40 minutes. Candidates should quickly identify the problems they are most confident about and solve those first.

Pattern 2: 180-Minute Mixed Assessment

This is the format most candidates encounter.

  • 2 coding questions
  • 9 math / logic questions

The logic questions are generally basic and involve probability, simple calculations, or pattern recognition. They are not overly complex, so the best strategy is to complete them quickly and reserve most of the time for coding problems.

Compared with the pure coding format, the mixed version usually provides more flexibility in time management.

Important HackerRank Tip

When submitting code on HackerRank, some hidden test cases may not show results immediately. It is highly recommended to manually test several edge cases before final submission:

  • Empty input
  • Single element arrays
  • Fully reversed data
  • Maximum input size

Many candidates lose points simply because edge conditions were not considered.

OA Coding Problem Review

Below are two representative medium-level problems that frequently appear in Goldman Sachs online assessments.

Problem 1: Stock Price Analysis

Problem Statement

You are given an array of stock prices where prices[i] represents the price of a stock on day i. Choose one day to buy and another future day to sell the stock to maximize profit. If no profit is possible, return 0.

Example

  • Input: [7,1,5,3,6,4] → Output: 5
  • Input: [7,6,4,3,1] → Output: 0

Constraints

  • 1 ≤ prices.length ≤ 105
  • 0 ≤ prices[i] ≤ 104

Approach

This classic greedy problem can be solved with a single pass through the array.

  • Track the minimum price seen so far
  • Update the maximum profit using the current price minus the minimum price

The algorithm runs in O(n) time and O(1) space.

def maxProfit(prices):
    if not prices or len(prices) < 2:
        return 0

    min_price = prices[0]
    max_profit = 0

    for price in prices[1:]:
        min_price = min(min_price, price)
        current_profit = price - min_price
        max_profit = max(max_profit, current_profit)

    return max_profit

Problem 2: Valid Parentheses with Multiple Types

Problem Statement

Given a string containing only parentheses characters () [] {}, determine whether the string is valid.

Rules:

  • Open brackets must be closed by the same type of bracket
  • Brackets must close in the correct order
  • Every closing bracket must have a corresponding opening bracket

Example

  • "()" → true
  • "()[]{}" → true
  • "(]" → false

Approach

This problem is solved using a stack data structure.

  • Push opening brackets onto the stack
  • When encountering a closing bracket, check if the top of the stack matches
  • If it matches, pop the stack; otherwise return false

After traversal, the stack must be empty for the string to be valid.

def isValid(s):
    stack = []
    bracket_map = {
        ')': '(',
        ']': '[',
        '}': '{'
    }

    for char in s:
        if char in bracket_map:
            if not stack or stack[-1] != bracket_map[char]:
                return False
            stack.pop()
        else:
            stack.append(char)

    return len(stack) == 0

Preparation Tips for Goldman Sachs OA

1. Focus on high-frequency medium problems

Most questions fall into common categories such as greedy algorithms, stacks, arrays, and string manipulation. Practicing the top interview patterns from these categories is usually sufficient.

2. Pay attention to edge cases

Empty inputs, extreme values, and boundary scenarios are frequently used to evaluate solution robustness.

3. Manage time strategically

In the mixed format, finish logic questions quickly and allocate more time to coding. In the pure coding format, prioritize problems you can solve confidently.

4. Become familiar with HackerRank

Understanding the platform interface and testing features beforehand can save valuable minutes during the exam.

Interview Assistance

If you want real-time interview guidance, coding hints, or online assessment support during technical interviews, you can explore professional assistance options here:

Technical Interview & OA Assistance – ProgramHelp

Top comments (0)