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

SDE - 1

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

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures including stack, queue, linked list, trees, hash maps, graphs, trieTopics like recursion, backtracking, dynamic programmingOOPsOperating System, Computer Networks, DBMSMySQL, MongoDb
Tip
Tip

Tip 1 : Practice 20-25 questions on each type of data structure.
Tip 2 : Be thorough with the recent project on which you are working on in current organisation.
Tip 3 : Be prepared with the technologies that you have mentioned in your resume.

Application process
Where: Linkedin
Eligibility: No
Resume Tip
Resume tip

Tip 1: Have at least 1 project on your resume with which you are wholly thorough with.
Tip 2: Mention your coding profile like links of GitHub or LeetCode.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 mins
Interview date3 Mar 2022
Coding problem2

1. 3Sum

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

You are given an array/list ARR consisting of N integers. Your task is to find all the distinct triplets present in the array which adds up to a given number K.

An array is said to have a triplet {ARR[i], ARR[j], ARR[k]} with sum = 'K' if there exists three indices i, j and k such that i!=j, j!=k and i!=j and ARR[i] + ARR[j] + ARR[k] = 'K'.

Note:
1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Problem approach

Two pointer approach

Try solving now

2. Letter Combinations of a Phone Number

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

Given a string S containing digits from 2 to 9 inclusive. Your task is to find all possible letter combinations that the number could represent.

A mapping from Digits to Letters (just like in Nokia 1100) is shown below. Note that 1 does not map to any letter.

example

Problem approach

FIFO Queue

Try solving now
02
Round
Easy
Video Call
Duration60 mins
Interview date10 Mar 2022
Coding problem1

1. N Queens

Hard
55m average time
35% success
0/120
Asked in companies
AmazonAdobeIntuit

You are given an integer 'N'. For a given 'N' x 'N' chessboard, find a way to place 'N' queens such that no queen can attack any other queen on the chessboard.

A queen can be killed when it lies in the same row, or same column, or the same diagonal of any of the other queens. You have to print all such configurations.

Problem approach

Using recursion and backtracking

Try solving now
03
Round
Easy
Video Call
Duration60 mins
Interview date17 Mar 2022
Coding problem2

1. Shortest Palindrome

Moderate
24m average time
75% success
0/80
Asked in companies
DunzoGoldman SachsNsquare

You are given a string ‘STR’. Your task is to find the shortest palindrome that can be formed by adding characters in front of ‘STR’.

For example:
You are given ‘STR’ = “aabcd”. Then our answer will be “dcbaabcd”. We can form a palindrome by adding ‘d’, ‘c’, and ‘b’ in front of ‘STR’.
Problem approach

KMP Algorithm

Try solving now

2. Remove Duplicates from Sorted Array

Easy
15m average time
85% success
0/40
Asked in companies
Goldman SachsSamsungHewlett Packard Enterprise

You are given a sorted integer array 'arr' of size 'n'.


You need to remove the duplicates from the array such that each element appears only once.


Return the length of this new array.


Note:
Do not allocate extra space for another array. You need to do this by modifying the given input array in place with O(1) extra memory. 


For example:
'n' = 5, 'arr' = [1 2 2 2 3].
The new array will be [1 2 3].
So our answer is 3.
Problem approach

Two pointer approach

Try solving now
04
Round
Easy
Video Call
Duration60 mins
Interview date24 Mar 2022
Coding problem1

1. Debugging question

In this round, they opened up their code base and asked me to figure out the error and fix it.

Problem approach

That was related to streams in java and exception handling.

05
Round
Easy
Video Call
Duration60 mins
Interview date31 Mar 2022
Coding problem2

1. Set Matrix Zeros

Easy
30m average time
65% success
0/40
Asked in companies
AmazonDunzoGoldman Sachs

You are given an N x M integer matrix. Your task is to modify this matrix in place so that if any cell contains the value 0, then all cells in the same row and column as that cell should also be set to 0.

Requirements:

  • If a cell in the matrix has the value 0, set all other cells in that cell's row and column to 0.
  • You should perform this modification in place (without using additional matrices).

You must do it in place.

For Example:

If the given grid is this:
[7, 19, 3]
[4, 21, 0]

Then the modified grid will be:
[7, 19, 0]
[0, 0,  0]
Problem approach

Solved using HashSet

Try solving now

2. Word Search - l

Moderate
30m average time
60% success
0/80
Asked in companies
OlaGoldman SachsIBM

You are given a 2D board('N' rows and 'M' columns) of characters and a string 'word'.


Your task is to return true if the given word exists in the grid, else return false. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring.


Note:
The same letter cell should not be used more than once.
For Example:
For a given word “design” and the given 2D board 
[[q’, ‘v’, ‘m’, ‘h’],
 [‘d’, ‘e’, ‘s’, ‘i’],
 [‘d’, ‘g’, ‘f’, ‘g’],
 [‘e’, ‘c’, ‘p’, ‘n’]]

The word design can be formed by sequentially adjacent cells as shown by the highlighted color in the 2nd row and last column.

board

Problem approach

Solved using DFS and backtracking

Try solving now
06
Round
Easy
Video Call
Duration60 mins
Interview date31 Mar 2022
Coding problem1

1. Basic Hr Questions

1. Why have you used this tech stack?

Problem approach

It revolved around recent projects and technologies used into it.

07
Round
Easy
HR Round
Duration30 mins
Interview date1 Apr 2022
Coding problem1

1. Basic HR Questions

Why you are leaving the current organisation?
Why do you want to join Goldman Sachs only?
Discussion regarding compensation and benefits.

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 - 1
2 rounds | 4 problems
Interviewed by Goldman Sachs
1884 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by Goldman Sachs
1376 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Goldman Sachs
2095 views
0 comments
0 upvotes
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Goldman Sachs
975 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115098 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58239 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35148 views
7 comments
0 upvotes