Goldman Sachs interview experience Real time questions & tips from candidates to crack your interview

Summer Analyst Intern

Goldman Sachs
upvote
share-icon
4 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Journey
I seriously started my coding and DSA practice from the 2nd year of college. Along the way, I also explored web development and machine learning, which helped me broaden my skills and understand how different areas of computer science connect and make my resume better. One thing I do regret is not giving enough focus to core CS fundamentals in the beginning. I realized their importance much later and had to put in extra effort to strengthen them. That experience taught me how crucial it is to build a strong foundation early on. When I applied to Goldman Sachs, it was after putting in consistent effort across problem-solving, projects, and learning from my mistakes. Every step of the journey—from resume shortlisting to the later stages—was a learning curve.
Application story
Goldman Sachs came for an off-campus placement drive, and the process was quite rigorous. It started with a 2-hour online assessment consisting of aptitude, mathematics, logical reasoning, and data interpretation questions. After that, there was a 1-hour coding and technical round that focused on problem-solving and coding fundamentals. The shortlisted candidates then went through two days of structured interviews. These included multiple elimination rounds that tested me across different areas—technical knowledge, analytical ability, and overall problem-solving approach. The entire process was designed to check both technical depth and consistency under pressure, making it a very valuable learning experience.
Why selected/rejected for the role?
I was rejected in the final technical round of the interview because my knowledge of core computer science fundamentals was not very strong at that time. While I had practiced coding and problem-solving, I realized that strengthening CS fundamentals is equally important.
Preparation
Duration: 24 months
Topics: DSA, Machine Learning, Computer Networks, Operating Systems, System Design, Web Development, OOPS
Tip
Tip

Tip 1: Focus on consistent preparation — practice DSA regularly on coding platforms and take part in contests to improve problem-solving speed.
Tip 2: Build a strong resume by adding diverse skills and backing them up with meaningful projects.
Tip 3: Maintain proper notes for quick revision of important concepts; they will be very helpful during interview preparation.

Application process
Where: Company Website
Eligibility: Above 7 CGPA, (Stipend: 1L per month)
Resume Tip
Resume tip

Tip 1: Keep your resume clean and well-structured — preferably in a single-column format for clarity and easy readability.
Tip 2: Add meaningful and impactful projects that truly showcase your skills. Highlight your role, contributions, and outcomes.
Tip 3: Gain experience through hackathons, events, and internships. Mention certifications that add credibility to your skillset.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120 minutes
Interview date22 Sep 2024
Coding problem0

Timing: The test window was open from 7:00 PM to 9:00 PM, so it was conducted in the evening.
Environment: It was an online proctored aptitude test with a strict and focused environment.
Significant Activity: The test consisted of 90 MCQ questions covering English, mathematics, logical reasoning, and image-based problems, all to be solved within 2 hours.

02
Round
Hard
Online Coding Test
Duration60 minutes
Interview date3 Nov 2024
Coding problem3

The test window was open for 3 hours in the evening, from 7:00 PM to 10:00 PM. It was an online proctored test with a strict and closely monitored setup.
The test consisted of 3 DSA coding questions of varying difficulty levels.

1. Significant Connected Components

Hard
0/120
Asked in company
Goldman Sachs

You are given an undirected graph represented by a list of edges. Your task is to analyze the connectivity of this graph.


First, identify all the connected components. A connected component is a subgraph where any two vertices are connected to each other by a path, and which is connected to no additional vertices in the supergraph.


After finding all connected components, you must filter them according to a rule: only consider components that have 2 or more nodes.


From this filtered list of significant components, find the size (number of nodes) of the smallest component and the size of the largest component.


Problem approach

Build the Graph
Convert the list of edges into an adjacency list.
Each node points to a list of nodes it is connected to.
Initialize Visited Set
Create a visited set to keep track of nodes you have already explored.
Traverse the Graph
For each unvisited node, perform BFS or DFS to explore all nodes connected to it.
Count the number of nodes visited in this traversal → this is the size of the connected component.
Filter Components
Ignore components with only one node.
Keep sizes of components with 2 or more nodes in a list.
Find Smallest and Largest
From the list of valid component sizes, find the minimum → smallest component.
Find the maximum → largest component.
Return the Result
Return [smallest_component_size, largest_component_size] as the answer.

Try solving now

2. Gas Stations

Moderate
10m average time
90% success
0/80
Asked in companies
AtlassianOlaPhonePe

You have been given a circular path. There are 'N' petrol pumps on this path that are numbered from 0 to N - 1 (Both inclusive). Each petrol pump has two values associated with it:

1)The amount of petrol that is available at this particular petrol pump.
2)The distance to reach the next petrol pump.

You are on a truck having an empty tank of infinite capacity. You can start the tour from any of the petrol pumps. Your task is to calculate the first petrol pump from where the truck will be able to complete the full circle or determine if it is impossible to do so.

You may assume that the truck will stop at every petrol pump and it will add the petrol from that pump to its tank. The truck will move one kilometre for each litre of petrol consumed.

Problem approach

Check Total Feasibility
Calculate total_gas = sum(gas) and total_cost = sum(cost).
If total_gas < total_cost, it’s impossible to complete the tour → return -1.
Initialize Tracking Variables
tank = 0 → keeps track of fuel in the car while traveling.
start = 0 → candidate starting station.
Traverse Each Station
For every station i from 0 to n-1:
Update fuel tank: tank += gas[i] - cost[i]
If tank < 0:
The current start station cannot work.
Move start = i + 1 and reset tank = 0.
Return the Result
After traversing all stations:
If total_gas >= total_cost, return start index.
Else, return -1.

Try solving now

3. Maximum XOR Subset

Moderate
0/80
Asked in company
Goldman Sachs

You are given an array arr of N positive integers. Your task is to find the maximum possible XOR value that can be obtained by selecting any non-empty subset of elements from the array and taking their bitwise XOR.


Problem approach

Understand XOR Properties
XOR of a number with itself → 0
XOR of a number with 0 → the number itself
XOR is commutative and associative
Use a Bitset / Binary Representation
Think of each number in binary form.
You can try greedy approach on bits from highest to lowest to build the maximum XOR.
Algorithm (Greedy Basis / Linear Algebra on Bits)
Initialize an empty array basis[] to store independent numbers for XOR.
For each number in the array:
Try to reduce it using existing basis:
For each bit from highest to lowest, if the bit is set and there’s already a number in basis with that bit, XOR it.
If number becomes non-zero after reduction, add it to the basis.
Finally, XOR all basis numbers in such a way to get the maximum possible XOR.
Return Maximum XOR
XOR of all basis elements in a greedy manner gives the answer.

Try solving now
03
Round
Medium
Video Call
Duration45 minutes
Interview date26 Nov 2025
Coding problem3

This round was conducted over Zoom across 2 days. Students were assigned a common virtual meeting room and had access to breakout rooms where individual interviews took place. Candidates were expected to be available from 9:00 AM to 7:00 PM, and could be called into a breakout room at any time during this window for their interview.

Each interview lasted approximately 45 minutes and included:
A basic introduction of the candidate
2 easy-to-medium DSA problems
Questions on core computer science fundamentals
A review of the candidate’s resume and projects

1. Find Minimum Number Of Coins

Easy
15m average time
85% success
0/40
Asked in companies
AdobeOracleGoldman Sachs

Given an infinite supply of Indian currency i.e. [1, 2, 5, 10, 20, 50, 100, 500, 1000] valued coins and an amount 'N'.


Find the minimum coins needed to make the sum equal to 'N'. You have to return the list containing the value of coins required in decreasing order.


For Example
For Amount = 70, the minimum number of coins required is 2 i.e an Rs. 50 coin and a Rs. 20 coin.
Note
It is always possible to find the minimum number of coins for the given amount. So, the answer will always exist.
Problem approach

You have coins[] with different denominations.
You need to make amount using minimum number of coins.
You can use any number of each coin.
Let dp[i] = minimum number of coins to make amount i.
dp[0] = 0 → 0 coins needed to make amount 0
dp[1..amount] = infinity → initially assume impossible
Fill the DP Array
For each amount i from 1 to amount:
For each coin in coins:
If i - coin >= 0, update:
dp[i] = min(dp[i], dp[i - coin] + 1)
If dp[amount] is still infinity → cannot make the amount → return -1
Otherwise → return dp[amount]

Try solving now

2. Add Two Numbers

Moderate
20m average time
80% success
0/80
Asked in companies
SamsungMicrosoftOracle

You are given two non-negative numbers 'num1' and 'num2' represented in the form of linked lists.


The digits in the linked lists are stored in reverse order, i.e. starting from least significant digit (LSD) to the most significant digit (MSD), and each of their nodes contains a single digit.


Calculate the sum of the two numbers and return the head of the sum list.


Example :
Input:
'num1' : 1 -> 2 -> 3 -> NULL
'num2' : 4 -> 5 -> 6 -> NULL

Output: 5 -> 7 -> 9 -> NULL

Explanation: 'num1' represents the number 321 and 'num2' represents 654. Their sum is 975.


Problem approach

Create a placeholder node called dummyHead with a value of 0. This node will hold the resulting linked list.
Initialize a pointer called tail and set it to dummyHead. This pointer will keep track of the last node in the result list.
Initialize a variable called carry to 0. This variable will store the carry value during addition.
Start a loop that continues until there are no more digits in both input lists (l1 and l2) and there is no remaining carry value.
Inside the loop:
Check if there is a digit in the current node of l1. If it exists, assign its value to a variable called digit1. Otherwise, set digit1 to 0.
Check if there is a digit in the current node of l2. If it exists, assign its value to a variable called digit2. Otherwise, set digit2 to 0.
Add the current digits from l1 and l2, along with the carry value from the previous iteration, and store the sum in a variable called sum.
Calculate the unit digit of sum by taking the modulus (%) of sum by 10. This digit will be placed in a new node for the result.
Update the carry variable by dividing sum by 10 and taking the integer division (/) part. This gives us the carry value for the next iteration.
Create a new node with the calculated digit as its value.
Attach the new node to the tail node of the result list.
Move the tail pointer to the newly added node.
Move to the next nodes in both l1 and l2, if they exist. If either list is exhausted, set the corresponding pointer to nullptr.
After the loop, obtain the actual result list by skipping the dummyHead node.
Delete the dummyHead node.
Return the resulting list.

Try solving now

3. OOPS

Give code for encapsulation for a bank management system. (Learn)

Problem approach

Identify the Key Entities
Example: BankAccount, Customer, Transaction
Decide Which Attributes Should Be Private
Account number, account holder name, balance → should not be directly accessible.
Provide Public Methods to Interact
Deposit money
Withdraw money
Check balance
Show account details
Add Validation Inside Methods
For example:
Don’t allow withdrawing more than balance
Don’t allow depositing negative amounts
Explain in Interviews
Emphasize:
Data is hidden (private)
Interaction is controlled (public methods)
This prevents errors and ensures security

04
Round
Easy
Face to Face
Duration30 minutes
Interview date27 Nov 2024
Coding problem2

This round focused primarily on one DSA problem, which tested problem-solving and coding skills.
Following the coding question, there was a 15–20 minute discussion on computer science fundamentals, covering topics such as Operating Systems (OS), Object-Oriented Programming (OOP), and other core concepts.
Additionally, the interviewer reviewed my resume and projects, asking questions to understand my experience, skills, and contributions.

1. Operating System

  • What is the difference between a process and a thread? (Learn)
  • What is a deadlock? (Learn)
  • What is the difference between virtual memory and physical memory? (Learn)
  • How does each algorithm affect turnaround time and waiting time? (Learn)
  • How do mutexes, semaphores, and monitors prevent concurrent access issues? (Learn)
Problem approach

Tip 1: Focus on core concepts like processes, threads, deadlocks, scheduling algorithms, memory management, and synchronization mechanisms.
Tip 2: Understand practical examples and watch videos for better clarity.
Tip 3: Practice solving OS-related questions from past placement interviews and make notes for revision.

2. Check If The String Is A Palindrome

Easy
10m average time
90% success
0/40
Asked in companies
CIS - Cyber InfrastructureSamsungSterlite Technologies Limited

You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols and whitespaces.

Note :

String 'S' is NOT case sensitive.

Example :

Let S = “c1 O$d@eeD o1c”.
If we ignore the special characters, whitespaces and convert all uppercase letters to lowercase, we get S = “c1odeedo1c”, which is a palindrome. Hence, the given string is also a palindrome.
Problem approach

Normalize the string (optional for case-insensitive check):
Convert all letters to lowercase.
Remove spaces or punctuation if needed.
Compare characters:
Compare the first character with the last character.
Compare the second character with the second-last character.
Continue until the middle of the string.
If all corresponding characters match, it is a palindrome.
Decide the result:
If all comparisons succeed → string is a palindrome.
If any comparison fails → string is not a palindrome.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which SQL clause is used to specify the conditions in a query?

Choose another skill to practice
Similar interview experiences
company logo
Summer Analyst Intern
3 rounds | 3 problems
Interviewed by Goldman Sachs
1256 views
1 comments
0 upvotes
company logo
Summer Analyst Intern
2 rounds | 2 problems
Interviewed by Goldman Sachs
2764 views
1 comments
0 upvotes
company logo
Summer Analyst Intern
3 rounds | 7 problems
Interviewed by Goldman Sachs
845 views
0 comments
0 upvotes
company logo
Python Developer
3 rounds | 9 problems
Interviewed by Goldman Sachs
685 views
0 comments
0 upvotes