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

SDE - Intern

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

Interview preparation journey

expand-icon
Preparation
Duration: 7 months
Topics: Probability Statistics, DSA, OOPS, DP, Graphs, Trees
Tip
Tip

Tip 1 : Keep calm and DSA prepared
Tip 2 : Use gfg and leetcode for prep
Tip 3 : Do codeforces for CP

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

Tip 1 : Mention Education and Internship details precisely
Tip 2 : Projects and achievements should be well highlighted

Interview rounds

01
Round
Easy
Online Coding Interview
Duration180 minutes
Interview date18 Jul 2021
Coding problem2

1. Beautiful Index

Easy
16m average time
91% success
0/40
Asked in companies
PayPalAppleFacebook

You are given an array ‘A’ of length ‘N’. You say an index ‘i’ is beautiful if the sum of the first ‘i - 1’ elements of the array ‘A’ equals the sum of the last ‘N - i’ elements of the array ‘A’, where ‘i’ is in 1-based indexing. Now you wonder which is the leftmost beautiful index.

Note: If you select the first index, then the sum of the prefix will be ‘0’, and if you select the last index, then the sum of the suffix will be ‘0’.

Note: You have to print the index in 1-based indexing.

For example:

Let’s say the array ‘A’ = [1, 3, 1, 5], then if we select index ‘2’, the sum of the prefix is ‘1’, and the sum of the suffix is 1 + 5 = 6. Since the sum is not the same, hence index ‘2’ is not a beautiful index.
Try solving now
Moderate
30m average time
80% success
0/80
Asked in companies
eBayGoldman Sachs42gearMobilitySystems

You are given a 2D matrix, your task is to return a 2D vector containing all elements of the matrix in a diagonal fashion.

Example:

Following will be the output of the above matrix:

1
5 2
9 6 3
13 10 7 4
14 11 8
15 12
16
Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date28 Jul 2021
Coding problem2

1. Level Order Traversal

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

You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.

For example:
For the given binary tree

Example

The level order traversal will be {1,2,3,4,5,6,7}.
Problem approach

Create an empty queue q and push root in q.
Run While loop until q is not empty. 
Initialize temp_node = q.front() and print temp_node->data.
Push temp_node’s children i.e. temp_node -> left then temp_node -> right to q
Pop front node from q.

Try solving now

2. Right View

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.

Problem approach

Perform level order traversal on the tree
At every level print the last node of that level

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date28 Jul 2021
Coding problem2

1. Puzzle Question

You have 5 jars of pills. Each pill weighs 10 grams, except for contaminated pills contained in one jar, where each pill weighs 9 grams. Given a scale, how could you tell which jar had the contaminated pills in just one measurement?

Problem approach

Step 1 : Take out 1 pill from jar 1, 2 pills from jar 2, 3 pills from jar 3, 4 pills from jar 4 and 5 pills from jar 5.
Step 2 : Put all these 15 pills on the scale. The correct weight is 150 (15*10). But one of the jars has contaminated pills. So the weight will definitely be less than 150.
Step 3 : If the weight is 149 then jar 1 has contaminated pills because there is only one contaminated pill. If the weight is 148 then jar 2, if the weight is 147 then jar 3, if 146 then jar 4, if 145 then jar 5

2. Check Bipartite Graph

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

Given a graph, check whether the graph is bipartite or not. Your function should return true if the given graph's vertices can be divided into two independent sets, ‘U’ and ‘V’ such that every edge (‘u’, ‘v’) either connects a vertex from ‘U’ to ‘V’ or a vertex from ‘V’ to ‘U’.

You are given a 2D array ‘edges’ which contains 0 and 1, where ‘edges[i][j]’ = 1 denotes a bi-directional edge from ‘i’ to ‘j’.

Note:
If edges[i][j] = 1, that implies there is a bi-directional edge between ‘i’ and ‘j’, that means there exists both edges from ‘i’ to ‘j’ and to ‘j’ to ‘i’.

For example

Given:
‘N’ = 3
‘edges’ = [[0, 1, 1], [0, 0, 1], [0,0,0]]. 

Problem approach

To be able to split the node set {0, 1, 2, ..., (n-1)} into sets A and B, we will try to color nodes in set A with color A (i.e., value 1) and nodes in set B with color B (i.e., value -1), respectively.

If so, the graph is bipartite if and only if the two ends of each edge must have opposite colors. Therefore, we could just start with standard BFS to traverse the entire graph and

color neighbors with opposite color if not colored, yet;
ignore neighbors already colored with oppsite color;
annouce the graph can't be bipartite if any neighbor is already colored with the same color.
NOTE: The given graph might not be connected, so we will need to loop over all nodes before BFS.

Try solving now
04
Round
Easy
HR Round
Duration30 minutes
Interview date28 Jul 2021
Coding problem1

1. Basic HR Questions

Tell me about yourself.

Most difficult situation faced and how did you handle it ?

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
2523 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
1012 views
1 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 14 problems
Interviewed by Goldman Sachs
813 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