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

Software Analyst

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

Interview preparation journey

expand-icon
Journey
My journey started when I was in 2nd year of my college and I saw my friends practicing coding questions and some learning new coding languages and developing some individual projects. After seeing them I started to think that I should also start to learn more and practice coding questions. When I practicing coding questions on platform like Codechef and Hackerrank it made me realize that I need to think more to solve difficult problems and due to that I developed a habit of solving them.
Application story
I started preparing for the companies since 2nd year of my college and when I heard that Goldman Sachs is coming to our college I wanted to get selected in it. After that the interview process began which consisted of 4 round in total and 1st round was only coding interview, 2nd round was on video call and consisted of coding questions, 3rd round was a system design round and last round was HR round but they also asked technical questions.
Why selected/rejected for the role?
I was selected as I had been preparing to crack the interviews and practicing various coding questions since 2nd year of my college. After that when I heard that Goldman Sachs is coming to our college I specially looked for the questions which are asked in previous interview experiences for this company. Due to this I was able to answer everything.
Preparation
Duration: 3.5 months
Topics: I covered major data structure topics like Arrays, Stacks, Queues, Linked List, Trees, Graphs, backtracking, Dynamic Programming. After reading each topic, I tried to practice maximum questions on the concerned topic from Coding Ninjas, geeksforgeeks, Hackerrank and when stuck on a question, I preferred watching solution videos provided by Coding Ninjas.
Tip
Tip

Tip 1 : It is important to practice coding consistently because it is what enables you to solve interview-questions in the stipulated time. But before this, it is even important to have a clear understanding of all the data-structures, so that they can be easily implemented as and when required to solve a problem. It is also mandatory to have a clear understanding of the time and space complexities of algorithms because this is what you are judged upon in real interviews. Good intuition and a good approach to solve a problem is what really helps to crack the interview of such companies. 


Tip 2 : They do not judge you upon the number of internships you have done or the number of projects you have made. A single ,good-quality project is sufficient, provided you have in-depth knowledge about it. What matters to them is how efficient learner you are, how good is your problem-solving skill and also how confident you are with your answers.

 
Tip 3 : Practise topic -wise questions, participate in lots of coding contests, watch lots of Youtube solutions even after you could solve a question, because you may find a different approach that is efficient than yours and watching video solutions is always a better option than just reading the solution , as it gives a clear and deeper understanding of the logics . Also pray hard along with your preparation.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Keep your resume short and clear. Mention your projects and internships with a brief description and year of completion. Mention coding languages are known to you, or other technical skills that you are good at. Do not mention anything that you are not good at. Highlight the topics that you are really good at. 
Tip 2 : Be very honest and figure out only those things in your resume that you really know. Anything extra or unknown may have a negative impact upon your interview if asked by the interviewer.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120 minutes
Interview date2 Aug 2020
Coding problem2

This round was held in the evening at 6 o'clock on Hackerrank. It had coding questions: easy, medium, and hard level and MCQ's ( 1 minute for each MCQ). Negative marking was also there.

1. Word Search

Moderate
30m average time
50% success
0/80
Asked in companies
SamsungUberOYO

You are given a two-dimensional grid having 'N' rows and 'M' columns, consisting of upper case characters. You are also given a word 'WORD'. You have to find the number of occurrences of that word in the grid.

Starting from a given cell, a word can be formed by moving in all eight directions: horizontally left, horizontally right, vertically up, vertically down, and four diagonal directions.

Example :
There are three occurrences of the word 'NINJA' in the following grid:

word_grid

Note :
1) Given word will not be a single character.

2) If occurrences of the given word start from two different cells, then these two occurrences are considered to be different.

Consider the word 'XYX' to be searched in the string 'AXYXB'. Here, we find an occurrence of 'XYX' at index 2 going in the right direction, and another occurrence at index 4 going in the left direction.

Although these two words correspond to the same word, they will be considered as different occurrences.
Problem approach

I sat with a pen and paper and used the provided test-case , which helped me to make a tree like structure , which had to be explored until its depth.This is where I realized that Depth First Search could be used to solve the problem.

Try solving now

2. Climbing the leaderboard

Moderate
15m average time
80% success
0/80
Asked in companies
Goldman SachsDunzoLenskart

Given a leaderboard of a game with the following ranking pattern:

The player with the highest score is ranked number 1 on the leaderboard.

Players who have equal scores receive the same ranking number, and the next player(s) receive the immediately following ranking number.

You are given game scores of a player of ‘M’ rounds. Your task is to return the position obtained in each round.

Note:
The leaderboard scores are in descending order.
The game scores are given in ascending order.
Problem approach

This problem was of easy level and I could easily come up with a solution after identifying a relation between the rank and index of the element.

Try solving now
02
Round
Medium
Video Call
Duration40 minutes
Interview date4 Aug 2020
Coding problem2

This was an interview round ( technical round) that was held on video-call and a coding platform was also shared. The interviewer was very friendly with me . She was praising me on every solution that I provided.

1. Flatten The Multi-Level Linked List

Moderate
10m average time
80% success
0/80
Asked in companies
AmazonGoldman SachsMicrosoft

You are given a multi-level linked list of 'N' nodes, each node has a next and child pointer which may or may not point to a separate node. Flatten the multi-level linked list into a singly linked list. You need to return the head of the updated linked list.

Example:

Sample Multi-Level

Flatten :

All the different rows are merged into a single row.
Problem approach

Step 1: I first traversed the linked list and on find a child pointer, descended down the list but forgot to keep track of the next pointers of such nodes.
Step 2: It dawned upon me that I need a container to keep hold of all next-pointers, and Stack could be used for this.
Step 3: Then I gave a solution using stack and also flattening the linked-list in O(n) time and the interviewer was happy with me.

Try solving now

2. Minimum Calls

There is a group of people and a special person in the group who does not know anybody, while other people in the group know him. Given a function: find(A, B) -> which returns True if A knows B and false if A does not know B. The task is to make minimum calls to this function to find out the special person.

Problem approach

Tip 1: Solution was easy: find(A, B)-> if it returns True, A is not the special person, since the special person does not know anybody. Also if find(A, B) -> return False, means B is not the special person, since he is known by everyone. This is how each time a person gets eliminated, and the person who remains is the special person.

03
Round
Medium
Video Call
Duration40 minutes
Interview date4 Aug 2020
Coding problem1

This was an interview round ( technical round) that was held on video-call and a coding platform was also shared. The interviewer was very friendly with me . She was praising me on every solution that I provided.

1. Design a hashset

Moderate
25m average time
65% success
0/80
Asked in companies
Goldman SachsExpedia GroupMorgan Stanley

Design a HashSet without using any built-in hash table libraries.

Implement the following public functions :

1) Constructor: It initializes the data members as required.

2) add(value): It inserts an element into the HashSet. The function takes one argument which is the value that needs to be added and returns nothing

3) contains(value): It checks whether the element exists in the HashSet or not. The function takes one argument which is the value that needs to be searched for in the HashSet. The function returns true if the element exists, otherwise returns false.

4) remove(value): It removes an element from the HashSet. The function takes one argument which is the value that needs to be removed from the HashSet and returns the element which is being removed. If the element does not exist in the HashSet or if HashSet is empty, return -1.
Operations Performed on the HashSet:
Query-1 (Denoted by an integer 1)- Inserts an element in the HashSet

Query-2 (Denoted by an integer 2)- Returns a boolean value denoting whether the element is present in the HashSet or not.

Query-3 (Denoted by an integer 3)- Removes the element from the HashSet.
Problem approach

I knew that HashSet uses O(1) time to search an element in the list. Also, the word ' Hash' in HashSet helped me to come up with the solution, to use hash table that can help solve the problem efficiently.

Try solving now
04
Round
Medium
HR Round
Duration40 minutes
Interview date4 Aug 2020
Coding problem3

It was online HR+Technical Round .

Hard
20m average time
80% success
0/120
Asked in companies
Goldman SachsUberApple

You are given an arbitrary binary tree, a node of the tree, and an integer 'K'. You need to find all such nodes which have a distance K from the given node and return the list of these nodes.


Distance between two nodes in a binary tree is defined as the number of connections/edges in the path between the two nodes.


Note:

1. A binary tree is a tree in which each node has at most two children. 
2. The given tree will be non-empty.
3. The given tree can have multiple nodes with the same value.
4. If there are no nodes in the tree which are at distance = K from the given node, return an empty list.
5. You can return the list of values of valid nodes in any order. For example if the valid nodes have values 1,2,3, then you can return {1,2,3} or {3,1,2} etc.
Example :

Sample Output 2 explanation

Consider this tree above. The target node is 5 and K = 3. The nodes at distance 1 from node 5 are {2}, nodes at distance 2 from node 5 are {1, 4} and nodes at distance 3 from node 5 are {6, 3}.
Problem approach

Tip 1:We can solve this problem using breadth first search. Main thing to observe in this problem is that if we find two marked nodes which are at largest distance from each other considering all pairs of marked nodes then if a node is at a distance less than K from both of these two nodes then it will be at a distance less than K from all the marked nodes because these two nodes represents the extreme limit of all marked nodes, if a node lies in this limit then it will be at a distance less than K from all marked nodes otherwise not. 
As in above example, node-1 and node-4 are most distant marked node so nodes which are at distance less than 3 from these two nodes will also be at distance less than 3 from node 2 also. Now first distant marked node we can get by doing a bfs from any random node, second distant marked node we can get by doing another bfs from marked node we just found from the first bfs and in this bfs we can also found distance of all nodes from first distant marked node and to find distance of all nodes from second distant marked node we will do one more bfs, so after doing these three bfs we can get distance of all nodes from two extreme marked nodes which can be compared with K to know which nodes fall in K-distance range from all marked nodes. 
 

Try solving now

2. What language do you code in ?

Problem approach

Tip 1: I had studied Python in-depth , so could answer all his questions .
Tip 2: There were some questions where I was stuck, but then was assisted by the interviewer in approaching to the solution.
 

3. Situational Problem

He gave me a situation where my colleague leaves the project in-between, and the deadline is approaching, how would I make up to meet the deadline in such a situation.

Problem approach

Tip 1: Taking assistance from my seniors, more dedication towards the project and approaching the manager for help were my answers .
 

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
Software Analyst
4 rounds | 6 problems
Interviewed by Goldman Sachs
2798 views
0 comments
0 upvotes
company logo
Software Analyst
4 rounds | 10 problems
Interviewed by Goldman Sachs
4977 views
0 comments
0 upvotes
company logo
Software Analyst
3 rounds | 9 problems
Interviewed by Goldman Sachs
1005 views
0 comments
0 upvotes
company logo
Software Analyst
3 rounds | 8 problems
Interviewed by Goldman Sachs
773 views
0 comments
0 upvotes