Goldman Sachs Online Assessment 2026: India Guide
What Goldman Sachs publishes about its campus hiring steps and HackerRank test, what candidates report, and 7 solved practice problems with tested Python.
on this page§ 08
What Goldman Sachs itself says
Everything in this section comes from the firm's student pages, read on 31 October 2026. Goldman Sachs describes the steps for campus applicants in one numbered list on its students preparation page.
| Step on the official page | What the page says |
|---|---|
| Apply | You submit an application, and the firm evaluates applications "throughout the recruiting season", so you may hear about different roles at different times |
| First interview | A video interview of approximately 30 minutes. Engineering applicants will be asked to take a HackerRank assessment |
| Superday | A series of final round interviews; the page says between two and five for campus hires, depending on the division |
Three honest limits. First, the page does not say how many questions the HackerRank test has, how long it runs, or what score clears it. Second, it is a worldwide students page, so India-specific rules (which campuses, which offices, which weeks) are not stated there. Third, the Superday step refers back to "your HireVue interview", so HireVue is the name of the video interview, not of the written test. Some coaching pages blur those two.
The firm's students landing page repeats the video-meeting step in its own words and says it wants people "from all academic backgrounds". For help with an application, the preparation page gives [email protected]. Use that address, not a forwarded message from a stranger.
What candidates report about the test
Nothing below comes from Goldman Sachs. It comes from two named public pages, both read on 31 October 2026, and they do not agree with each other. Treat the numbers as a rough picture, not a spec.
| Detail | placementpreparation.io (GUVI), page labelled 2026 | csestack.org, dated 10 February 2022 |
|---|---|---|
| Who it describes | Engineering Analyst role, Bengaluru and Hyderabad offices, campus and off-campus | A candidate recruited as an experienced hire, not a fresher |
| Aptitude round | 66 MCQs in 90 minutes on HackerRank, +5 for a correct answer and -2 for a wrong one | Not described |
| Coding | 2-3 coding problems plus 8-11 technical MCQs, listed as a second round, with on-campus candidates possibly going straight from aptitude to interviews | 2 programming questions, 120 minutes, HackerRank |
| Difficulty | Medium to Hard, the page says LeetCode Medium-Hard equivalent | The writer calls it medium |
| Languages | C, C++, Java, Python | Writer used Python |
Why the gap? The 2022 account is one person's experience of a lateral-hire test, written four years ago. The GUVI page is a preparation site (it calls itself an HCL GUVI product) that gives no date of observation and no source for its tables. Neither can tell you what your campus will run this season. The one safe reading is that the written test is hosted on HackerRank, which Goldman Sachs confirms, and that coding at medium level or above is what both describe.
Our own sibling pages on the Goldman Sachs placement papers and interview questions carry other candidate-reported patterns. If a number there differs from this page, trust your own invitation email over both.
A topic plan for the coding side
The GUVI page lists arrays and strings, dynamic programming, graph algorithms, sorting and searching as the topics its coding section covers. The official page lists no topics, so this plan is PapersAdda's own, built from that one candidate-reported list.
- Arrays and strings with two pointers or a sliding window (problems 1 and 7 below). Start here; it pays back fastest.
- Dynamic programming on a line or a small grid (problem 2). Revise with the dynamic programming patterns page.
- Graph search on a grid (problem 3). The graph traversal patterns page covers BFS and DFS.
- Sorting and sweeping over events (problem 4).
- Probability and counting by hand (problems 5 and 6), because the GUVI page lists probability, permutations and combinations inside its numerical section.
For the platform itself, the Amazon online assessment guide explains timing and test-case habits that carry over to any timed coding test.
Practice problems in the style of the Goldman Sachs online assessment
These 7 problems were written by PapersAdda. None is a recalled or leaked question, and none was asked in a Goldman Sachs test. The difficulty is aimed at the medium level the candidate pages describe. Every solution below was run in Python 3.12 against its worked example, extra hand-made cases, and a slow brute-force checker on random inputs (details in the last section).
Problems 5 and 6 use from fractions import Fraction, and problem 5 also uses from collections import defaultdict; problem 3 uses from collections import deque. Add those lines at the top of your file.
Problem 1: Longest window with a limited sum
Task. Given n positive integers and a limit K, find the length of the longest block of consecutive numbers whose sum is at most K. If even one number alone is above K, the answer for that start is zero.
Format. First line: n and K. Second line: n positive integers. Output: one integer, the longest length (0 if no block fits).
Worked example. Input: 6 5 then 2 1 3 1 1 4. Output: 3. The blocks 1 3 1 and 3 1 1 both sum to 5. Every block of four numbers sums to at least 6, so none fits.
def longest_window(a, k):
best = 0
left = 0
total = 0
for right, v in enumerate(a):
total += v
while total > k:
total -= a[left]
left += 1
best = max(best, right - left + 1)
return best
Time complexity. O(n) time, O(1) extra space. Each index enters and leaves the window once.
Problem 2: Cheapest way to the last step
Task. A staircase has n steps, each with a cost. You start on step 0 and pay its cost. Each move goes forward 1, 2 or 3 steps, and you pay the cost of the step you land on. Find the smallest total cost to land on the last step.
Format. First line: n (at least 2). Second line: n non-negative costs. Output: the smallest total.
Worked example. Input: 6 then 0 3 2 5 1 4. Output: 6. Go from step 0 to step 2 (pay 2), then to step 5 (pay 4): 0 + 2 + 4 = 6.
def min_cost_to_end(cost):
n = len(cost)
INF = float("inf")
dp = [INF] * n
dp[0] = cost[0]
for i in range(1, n):
for step in (1, 2, 3):
if i - step >= 0:
dp[i] = min(dp[i], dp[i - step] + cost[i])
return dp[-1]
Time complexity. O(n) time (three options per step), O(n) space.
Problem 3: Count the islands
Task. A grid holds the characters 0 (water) and 1 (land). Two land cells belong to the same island if they share an edge (up, down, left, right). Diagonal contact does not count. Print the number of islands.
Format. First line: rows and columns. Then one line per row, with no spaces. Output: the island count.
Worked example. Input rows: 11000, 11000, 00100, 00011. Output: 3. The top-left 2 by 2 block is one island, the single middle cell is another, and the bottom-right pair is the third.
def count_islands(grid):
rows, cols = len(grid), len(grid[0])
seen = [[False] * cols for _ in range(rows)]
islands = 0
for r in range(rows):
for c in range(cols):
if grid[r][c] == '1' and not seen[r][c]:
islands += 1
seen[r][c] = True
queue = deque([(r, c)])
while queue:
x, y = queue.popleft()
for dx, dy in ((1, 0), (-1, 0), (0, 1), (0, -1)):
nx, ny = x + dx, y + dy
if 0 <= nx < rows and 0 <= ny < cols \
and grid[nx][ny] == '1' and not seen[nx][ny]:
seen[nx][ny] = True
queue.append((nx, ny))
return islands
Time complexity. O(R * C) time and space, since each cell is queued at most once.
Problem 4: Fewest meeting rooms
Task. Each meeting has a start time and an end time. A meeting that ends at time t frees its room for another that starts at t. Find the smallest number of rooms that lets every meeting run.
Format. First line: m. Then m lines, each with a start and an end (start below end). Output: the room count.
Worked example. Input: 3 meetings 0 30, 5 10, 15 20. Output: 2. The first meeting is still running while the other two take place one after the other in a second room.
def min_rooms(meetings):
events = []
for start, end in meetings:
events.append((start, 1))
events.append((end, -1))
events.sort() # at equal time, -1 (end) comes before +1 (start)
rooms = best = 0
for _, change in events:
rooms += change
best = max(best, rooms)
return best
Time complexity. O(m log m) time for sorting the 2m events, O(m) space.
Problem 5: Chance of a dice total
Task. You roll n fair six-sided dice. Print the probability that the faces add up to exactly s, as a fraction in lowest terms (print 0 if s cannot happen).
Format. One line with n and s. Output: the fraction, such as 1/6.
Worked example. Input: 2 7. Output: 1/6. Six of the 36 equally likely rolls total 7: (1,6), (2,5), (3,4), (4,3), (5,2), (6,1). A second check: 3 10 gives 1/8, because 27 of the 216 rolls total 10.
def dice_probability(n, s):
ways = {0: 1}
for _ in range(n):
nxt = defaultdict(int)
for total, count in ways.items():
for face in range(1, 7):
nxt[total + face] += count
ways = nxt
return Fraction(ways.get(s, 0), 6 ** n)
Time complexity. O(n^2) time: n rounds, up to 6n running totals, 6 faces each. Counting ways first and dividing once keeps the answer exact.
Problem 6: Gambler's ruin
Task. You hold i coins and play rounds until you reach N coins or have none. Each round you win one coin with probability p and lose one with probability 1 - p. Find the probability that you reach N before you reach 0, as an exact fraction. Assume 0 < p < 1 and 0 <= i <= N.
Format. One line with i, N and p written as a fraction a/b. Output: the probability as a fraction.
Worked example. Input: 3 10 1/2. Output: 3/10. For a fair game the chance equals your share of the target. A second check: 1 2 2/3 gives 2/3, because one round decides everything and you win it with probability p.
The formula: if p equals 1 - p the answer is i/N. Otherwise let r = (1 - p)/p and the answer is (1 - r^i)/(1 - r^N).
def ruin_win_probability(start, target, p):
q = 1 - p
if p == q:
return Fraction(start, target)
r = q / p
return (1 - r ** start) / (1 - r ** target)
Time complexity. O(log N) multiplications with fractions. The formula comes from solving h(k) = p * h(k+1) + (1 - p) * h(k-1) with h(0) = 0 and h(N) = 1.
Problem 7: Longest stretch with at most K kinds of letters
Task. Given a string of lowercase letters and an integer K, find the length of the longest substring that contains at most K different letters.
Format. First line: the string. Second line: K. Output: one integer.
Worked example. Input: eceba and 2. Output: 3. The substring ece has two kinds of letters. Adding the next letter b would make three.
def longest_k_distinct(s, k):
if k == 0:
return 0
count = {}
left = best = 0
for right, ch in enumerate(s):
count[ch] = count.get(ch, 0) + 1
while len(count) > k:
count[s[left]] -= 1
if count[s[left]] == 0:
del count[s[left]]
left += 1
best = max(best, right - left + 1)
return best
Time complexity. O(n) time, O(K) extra space for the letter counts.
How the solutions were checked
All 7 functions live in one file with a test harness. Each worked example above is a test. Problems 1, 2, 3, 4 and 7 were also compared with a separate brute-force version on 300 random inputs each. Problem 5 was compared with full enumeration of every dice roll for 1 to 5 dice and every possible sum. Problem 6 was compared with a slow numerical solve of the same equations for four settings. The run finished with 1609 checks passed and 0 failed. A solution that passes your own examples can still fail hidden cases, so when you practise, write a brute-force checker too.
WHAT PAPERSADDA THINKS
The official page gives you one firm fact that matters for planning: engineering applicants face a HackerRank assessment. It gives you no pass mark, so any site that quotes you a "cutoff" for Goldman Sachs is quoting a candidate, a guess, or a copy of another site. Do not build your plan around a number you cannot trace.
Where the candidate pages overlap, the preparation is not exotic: clean sliding-window, DP and graph code in a language you can write without looking things up, plus comfort with probability. The risk is not obscure algorithms. It is writing code that works on the sample and breaks on an empty case, a repeated value or a large input. Practise by writing the brute-force checker first, as the harness here does.
Also decide your language early. The GUVI page lists Python among the allowed languages, and Python's integers do not overflow, which removes one class of bug in counting problems. If your campus invitation names allowed languages, that note overrides everything on this page.
Related Resources
- Goldman Sachs placement papers 2026
- Goldman Sachs interview questions 2026
- Goldman Sachs fresher salary in India 2026
- Goldman Sachs Engineering Analyst 2025 campus marathon
- Dynamic programming patterns 2026
- Graph traversal patterns 2026
- Amazon online assessment 2026
Frequently Asked Questions
Does Goldman Sachs run an online assessment for freshers in India?
Goldman Sachs says on its students preparation page that engineering applicants will be asked to take a HackerRank assessment after a selected application. That page is firm-wide and does not name India, a campus or a date, so confirm the format in the invitation you receive.
How long is the Goldman Sachs HackerRank test?
Goldman Sachs does not publish a duration. Candidate-reported figures differ: a placementpreparation.io page labelled 2026 describes a 66-question aptitude round of 90 minutes, and a csestack.org account dated 10 February 2022 describes 2 coding questions in 120 minutes. Use your invitation, not either figure.
Is there negative marking in the Goldman Sachs online assessment?
Goldman Sachs does not publish a marking scheme. One candidate-reported page says the aptitude round scores +5 for a correct answer and -2 for a wrong one, and no negative marking in the coding section. Treat that as unconfirmed until your own test instructions say so.
Is HireVue the written test?
No. On the Goldman Sachs students preparation page the first interview is a video interview of approximately 30 minutes, and the Superday step refers to it as your HireVue interview. The HackerRank assessment is a separate step for engineering applicants.
Which programming languages are allowed in the Goldman Sachs coding test?
Goldman Sachs does not list languages on the student pages PapersAdda read. A candidate-reported page lists C, C++, Java and Python. Check the language list inside your test invitation before the day.
How many interviews follow the online assessment?
The official students preparation page says the Superday usually has between two and five interviews for campus hires, depending on the division. The number for your role can differ.
Were these practice problems asked in a real Goldman Sachs test?
No. PapersAdda wrote all 7 problems from scratch to match the medium difficulty that candidate pages describe, and every solution was run and tested. None is a recalled question.
Who do I contact if my application has a problem?
The Goldman Sachs students preparation page gives [email protected] for help or technical support, and says you can check your application status by logging into the application portal. Do not pay anyone or share your login with a third party.
Sources and review notesreviewed 2 Nov 2026
Official notices, candidate reports, offer documents, and editorial practice questions carry different confidence levels. The visible source list lets you inspect the evidence instead of relying on a blanket verification badge.
topic cluster
More resources in Guides & Resources
Use the category hub to browse similar questions, exam patterns, salary guides, and preparation resources related to this topic.
company hub
Explore all Goldman Sachs resources
Open the Goldman Sachs hub to jump between placement papers, interview questions, salary guides, and related pages in one place.
paid contributor programme
Sat Goldman Sachs this year? Share your story, earn ₹500.
First-person experience reports help future candidates prep smarter. We pay verified contributors ₹500 via UPI per accepted story with byline.
Submit your story →ready to practice?
Take a free timed mock test
Put what you learned into practice. Our mock tests match the 2026 pattern with timer, navigator, reveal, and score breakdown. No signup.