Just ended recently Goldman Sachs 2026 SDE Intern OA. After overall experience, the structure of this year's OA is actually relatively clear, and the difficulty is not as outrageous as imagined, but there are indeed many details. If you don’t pay enough attention to boundary conditions when answering questions, it’s easy to overturn on seemingly simple questions. While my memory is still relatively clear, I will sort out the overall process of this OA and the types of questions encountered, so as to serve as a reference for students preparing later.

OA platform and question structure
This year, Goldman Sachs’ written exams are basically conducted on the HackerRank platform. The system will allocate two sets of questions A / B based on the information filled in during the application, rather than randomly selecting questions, so the question types and structures encountered by different people may not be exactly the same.
There are two main modes overall. One is a 120-minute pure coding mode, usually three to four algorithm questions, with a difficulty level of roughly LeetCode Medium. The other is a 180-minute mixed format with two coding questions and nine math questions.
Goldman Sachs 2026 SDE Intern OA Real Exam Questions Review
Problem 1: Stock Price Analysis (Medium)
Question description
You are given an array of stock prices where Prices[i] Represents the price of a stock on day I. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock.
Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.
Example 1
Input: Prices = [7,1,5,3,6,4]
Output: 5
Explanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6 – 1 = 5.
Example 2
Input: Prices = [7,6,4,3,1]
Output: 0
Explanation: In this case, no transactions are done and the max profit = 0.
Constraints1 <= prices.length <= 10^50 <= prices[i] <= 10^4
Problem-solving ideas
This is a very classic stock buying and selling problem. The essence is to examine the application of greedy algorithms. The core idea is to traverse the array while maintaining the lowest buying price so far, and try to use the current price as the selling price to calculate the maximum profit.
Two state variables need to be maintained throughout the process, one is the current lowest price Min_price, the other is the current maximum profit Max_profit. When a new price is traversed, the lowest price is updated first, then the profit of the current sale is calculated, and the maximum profit is updated.
The time complexity is O(n) since the array only needs to be traversed once.
The space complexity is O(1), using only constant extra variables.
Code implementation
Def maxProfit(prices):
if not prices or len(prices) {result}")
Problem 2: Valid Parentheses with Multiple Types (Medium)
Question description
Given a string S Containing just the characters ( ) { } [ And ], determine if the input string is valid.
An input string is valid if:
- Open brackets must be closed by the same type of brackets
- Open brackets must be closed in the correct order
- Every close bracket has a corresponding open bracket of the same type
Example 1
Input: S = "()"
Output: True
Example 2
Input: S = "()[]{}"
Output: True
Example 3
Input: S = "(]"
Output: False
Constraints1 <= s.length <= 10^4S Consists of parentheses only '()[]{}'.
Problem-solving ideas
This is a typical stack structure application question, used to detect whether the brackets in the string match. The core idea is to use the stack to save the left bracket encountered, and when the right bracket is encountered, check whether the top element of the stack matches it.
If it matches, pop the top element of the stack. If it doesn't match or the stack is empty, the string is invalid. After the traversal is completed, if the stack is empty, it means that all brackets have been successfully matched.
The time complexity is O(n) since the string only needs to be traversed once.
The space complexity is O(n), and in the worst case the stack needs to store all characters.
Code implementation
Def isValid(s):
stack = []
mapping = {
')': '(',
']': '[',
'}': '{'
}
for char in s:
if char in mapping:
if not stack or stack[-1] != mapping[char]:
return False
stack.pop()
else:
stack.append(char)
returnlen(stack) == 0
Learn more
If you are about to take OA but are not sure about the scope and structure of the questions, it will actually be very helpful to know the actual question types in advance. Many students get stuck in the written test. It's not that they don't know how to write code, but that they haven't seen similar question types and can't develop their ideas for a while.
We have been sorting out the latest OA exam questions from major companies for a long time, including written test question banks from Amazon, Goldman Sachs, TikTok, Citadel, JPMorgan and other companies, and the question types are updated in a timely manner. If you encounter stuck questions or lack of time during the exam, you can also provide OA real-time assists , to help quickly locate the direction of problem solving.