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

SDE - Intern

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

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, OOPS, OS, DBMS, C++ or Java(Proficient in anyone)
Tip
Tip

Tip 1 : DSA should be on your tips. There are many websites to practice DSA e.g. GeeksForGeeks, LeetCode, InterviewBit, etc. After solving a problem, check for other solutions as well.
Tip 2 : Prepare questions related to your project before your interview only, for e.g. why you chose this project (basically tell about what real life problem it solves), why did you used this tech stack in your project, etc.
Tip 3 : In interviews for coding questions start from brute-force solution and gradually try to reduce the time complexity. And keep explaining your thought process to your interviewer, their main objective is to check your problem solving skills. 
Tip 4: Also prepare for subjects like OOPS, OS, DBMS, and CN. There are numerous playlists available on YouTube for these. For OS, DBMS, and CN you may refer to Knowledge Gate, Neso Academy, or Gate Smashers on YouTube or read articles on GFG.
Tip 5: For aptitude practice, you can refer to indiabix website.
Tip 6: Also think of points which you will be speaking in your introduction before interviews, it's the first impression that is made on your interviewer, hence it should be a good one.
Tip 7: Goldman Sachs is famous for asking puzzles, so make sure to read them before your interviews from GeeksForGeeks( Link: https://www.geeksforgeeks.org/puzzles/#Puzzles )
Tip 8: Stay calm and answer the questions confidently.

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1: Try to keep your resume up to one page.
Tip 2: Instead of having long list of projects, having one good project in your resume which solves some real life problem is enough.
Tip 3: Give a brief description about your every project in resume and also provide it's github repo link.
Tip 4: Double check your resume before your interviews. You should know each and everything that is mentioned on your resume.
Tip 5: Make sure you right only those skills in which you are confident. If you have basic knowledge of something you can write Basic in brackets after that skill.

Interview rounds

01
Round
Hard
Online Coding Test
Duration135 minutes
Interview date5 Aug 2021
Coding problem3

There were 5 sections in this round and every section was time bound.

Section 1:
=> 2 coding questions
=> Time: 30 min

Section 2: Quantitative aptitude( trigonometry, PnC, Co-Ordinate geometry (JEE level) ):
=> Marking: +5,-2
=> Time: 25 min
=> 8 MCQs

Section 3: (MCQs based on CS fundamentals and DSA):
=> Marking: +5,-2
=> Time: 20 min
=> 7 MCQs

Section 4:
=> The Advanced Programming Section had 1 programming question.
=>Time: 45 mins.

Section 5:
=> 2 HR type questions
=> Time: 15 min

Questions of section-5:
1. If you are working on some project and you are about to finish it on time but suddenly your partner is not able to continue further than in this case what will you do.
2. Anyone instance when you were very excited and determined to do something and you ended up with better results than your expectations.

1. Find all occurrences of a given word in a matrix.

Moderate
35m average time
60% success
0/80
Asked in companies
Goldman SachsMicrosoftOracle

You are given a 'M' x 'N' matrix of characters, 'CHARACTER_MATRIX' and a string 'WORD'. Your task is to find and print all occurrences of the string in the given character matrix. You are allowed to search the string in all eight possible directions, i.e. North, South, East, West, North-East, North-West, South-East, South-West.

Note: There should not be any cycle in the output path. The entire string must lie inside the matrix boundary. You should not jump across boundaries, i.e. from row 'N' - 1 to 0 or column 'N' - 1 to 0 or vice versa.

Example:

Consider below matrix of characters,
[ 'D', 'E', 'X', 'X', 'X' ]
[ 'X', 'O', 'E', 'X', 'E' ] 
[ 'D', 'D', 'C', 'O', 'D' ]
[ 'E', 'X', 'E', 'D', 'X' ]
[ 'C', 'X', 'X', 'E', 'X' ]

If the given string is "CODE", below are all its occurrences in the matrix:

'C'(2, 2) 'O'(1, 1) 'D'(0, 0) 'E'(0, 1)
'C'(2, 2) 'O'(1, 1) 'D'(2, 0) 'E'(3, 0)
'C'(2, 2) 'O'(1, 1) 'D'(2, 1) 'E'(1, 2)
'C'(2, 2) 'O'(1, 1) 'D'(2, 1) 'E'(3, 0)
'C'(2, 2) 'O'(1, 1) 'D'(2, 1) 'E'(3, 2)
'C'(2, 2) 'O'(2, 3) 'D'(2, 4) 'E'(1, 4)
'C'(2, 2) 'O'(2, 3) 'D'(3, 3) 'E'(3, 2)
'C'(2, 2) 'O'(2, 3) 'D'(3, 3) 'E'(4, 3)
Try solving now

2. Check if a number can be written as a sum of ‘k’ prime numbers

Moderate
15m average time
85% success
0/80
Asked in companies
AmazonOptumGoldman Sachs

Given a positive even integer 'K', your task is to find two prime numbers whose sum is equal to 'K'. If there are multiple answers, you may find any.

Example , for K = 4 the pair is ( 2, 2) , For K = 10 the pair is ( 3, 7).

Note :
It is guaranteed that 'K' will always be greater than two.
Try solving now

3. Similar to traversing matrix in zig-zag fashion

Easy
0/40
Asked in companies
CultfitOracleGoldman Sachs

You are given a N x M matrix of integers, print the spiral path of the matrix.

For example:

Spiral Path

Try solving now
02
Round
Easy
Video Call
Duration30 minutes
Interview date10 Aug 2021
Coding problem3

The interview started with my introduction and then he jumped to coding questions.

1. Find minimum and maximum element in an array.

Easy
15m average time
70% success
0/40
Asked in companies
HSBCSalesforceSprinklr

You are given an array ‘Arr’ consisting of ‘N’ distinct integers and a positive integer ‘K’. Find out Kth smallest and Kth largest element of the array. It is guaranteed that K is not greater than the size of the array.

Example:

Let ‘N’ = 4,  ‘Arr’ be [1, 2, 5, 4] and ‘K’ = 3.  
then the elements of this array in ascending order is [1, 2, 4, 5].  Clearly, the 3rd smallest and largest element of this array is 4 and 2 respectively.
Try solving now

2. Given an array and a number, find all pairs in array with sum as given number.

Easy
15m average time
90% success
0/40
Asked in companies
Media.netExpedia GroupQuikr

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

Note:

Each pair should be sorted i.e the first value should be less than or equals to the second value. 

Return the list of pairs sorted in non-decreasing order of their first value. In case if two pairs have the same first value, the pair with a smaller second value should come first.
Try solving now

3.

You have a 3 and a 5 litre water container, each container has no markings except for that which gives you it's total volume. You also have a running tap. You must use the containers and the tap in such away as to exactly measure out 4 litres of water. How is this done?

03
Round
Medium
Video Call
Duration45 minutes
Interview date10 Aug 2021
Coding problem3

The interview started with my introduction and the interviewer gave his introduction as well.
This round was based on DSA and Resume.
Interviewer asked me some questions based on my resume and projects.

1. Find maximum possible stolen value from houses

Moderate
26m average time
0/80
Asked in companies
PayPalExpedia GroupGoldman Sachs

A thief wants to loot houses. He knows the amount of money in each house. He cannot loot two consecutive houses. Find the maximum amount of money he can loot.

Try solving now

2. Print Right View of a Binary Tree

Moderate
35m average time
65% success
0/80
Asked in companies
AmazonAdobeUber

You have been given a Binary Tree of integers.

Your task is to print the Right view of it.

The right view of a Binary Tree is a set of nodes visible when the tree is viewed from the Right side and the nodes are printed from top to bottom order.

Try solving now

3. Search in a row wise and column wise sorted matrix

Moderate
15m average time
80% success
0/80
Asked in companies
NoBrokerOracleGoldman Sachs

You are given an 'N * N' matrix of integers where each row and each column is sorted in increasing order. You are given a target integer 'X'.


Find the position of 'X' in the matrix. If it exists then return the pair {i, j} where 'i' represents the row and 'j' represents the column of the array, otherwise return {-1,-1}


For example:
If the given matrix is:
[ [1, 2, 5],
  [3, 4, 9],
  [6, 7, 10]] 
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
Try solving now
04
Round
Medium
Video Call
Duration30 minutes
Interview date10 Aug 2021
Coding problem2

In this round there were 2 interviewers. They asked for my introduction and then introduced themselves.

I was asked one coding question, one theory question and one puzzle in this round.

The theory question was:
Suppose you have 2 functions, lets say first is A, and another is B.
Function A takes 2 values as parameter and returns sum of these two numbers. Function B is used by A to add the two numbers.
Now there is another function C going on which is trying to access those two variables, and we some how want to prevent function C from accessing those two variables because it can change the value of those two variables. The condition is that you can't use classes. So find out how to prevent the function C from accessing those two variables.

1. Container with Most Water

Moderate
15m average time
90% success
0/80
Asked in companies
BNY MellonAmazonSAP Labs

Given a sequence of ‘N’ space-separated non-negative integers A[1],A[2],A[3],......A[i]…...A[n]. Where each number of the sequence represents the height of the line drawn at point 'i'. Hence on the cartesian plane, each line is drawn from coordinate ('i',0) to coordinate ('i', 'A[i]'), here ‘i’ ranges from 1 to ‘N’. Find two lines, which, together with the x-axis forms a container, such that the container contains the most area of water.

Note :
1. You can not slant the container i.e. the height of the water is equal to the minimum height of the two lines which define the container.

2. Do not print anything, you just need to return the area of the container with maximum water.
Example

water-diagram

For the above Diagram, the first red marked line is formed between coordinates (2,0) and (2,10), and the second red-marked line is formed between coordinates (5,0) and (5,9). The area of water contained between these two lines is (height* width) = (5-2)* 9 = 27, which is the maximum area contained between any two lines present on the plane. So in this case, we will return 3* 9=27.
Try solving now

2.

Pay an employee using a gold rod of 7 units
 

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Goldman Sachs
2522 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 11 problems
Interviewed by Goldman Sachs
5992 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Goldman Sachs
1011 views
1 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Goldman Sachs
821 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15499 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes