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

Analyst

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

Interview preparation journey

expand-icon
Preparation
Duration: 2 Months
Topics: Array, String, Trees/Graphs, Dynamic Programming, Stack/Queue
Tip
Tip

Tip 1 : During preparation as a working professional, try to utilize weekends and take mock tests for sure
Tip 2 : Select an online coding prlatform and practise atleast one question a day

Application process
Where: Email Approach
Eligibility: Matching skills and good cgpa
Resume Tip
Resume tip

Tip 1 : Keep it of one page if possible and mention keywords on resume which are mentioned on the job description if you have matching skills
Tip 2 : Don't put skills which you are not confident on.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date18 Jul 2021
Coding problem2

1. Chocolate Problem

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

Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the task is to distribute the chocolate to their students. Distribute chocolate in such a way that:

1. Each student gets at least one packet of chocolate.

2. The difference between the maximum number of chocolate in a packet and the minimum number of chocolate in a packet given to the students is minimum.

Example :

Given 'N' : 5 (number of packets) and 'M' : 3 (number of students)

subsequence

And chocolates in each packet is : {8, 11, 7, 15, 2}

All possible way to distribute 5 packets of chocolates among 3 students are -

( 8,15, 7 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 8, 15, 2 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’ 
( 8, 15, 11 ) difference of maximum-minimum is ‘15 - 8’ = ‘7’
( 8, 7, 2 ) difference of maximum-minimum is ‘8 - 2’ = ‘6’
( 8, 7, 11 ) difference of maximum-minimum is ‘11 - 7’ = ‘4’
( 8, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’
( 15, 7, 2 ) difference of maximum-minimum is ‘15 - 2’ = 13’
( 15, 7, 11 ) difference of maximum-minimum is ‘15 - 7’ = ‘8’
( 15, 2, 11 ) difference of maximum-minimum is ‘15 - 2’ = ‘13’
( 7, 2, 11 ) difference of maximum-minimum is ‘11 - 2’ = ‘9’

Hence there are 10 possible ways to distribute ‘5’ packets of chocolate among the ‘3’ students and difference of combination (8, 7, 11) is ‘maximum - minimum’ = ‘11 - 7’ = ‘4’ is minimum in all of the above.
Try solving now

2. Digits Decoding

Moderate
25m average time
70% success
0/80
Asked in companies
FacebookAdobeOYO

A few days back, Ninja encountered a string containing characters from ‘A’ to ‘Z’ which indicated a secret message. For security purposes he encoded each character of the string to its numeric value, that is, A = 1, B = 2, C = 3, till Z = 26 and combined them as a single sequence (SEQ) of digits of length N. Let's say the message was "LA", Ninja encoded it as 121 for L=12 and A=1.

Today, when he read the encoded secret message, he realised that he was not able to decode the original string. So, the Ninja is wondering in how many ways he can decode the numeric sequence to some valid string.

A valid string is a string with characters from A to Z and no other characters.

Example:
Let the encoded sequence be 121,

The first way to decode 121 is:
1 = A
2 = B
1 = A
Thus, the decoded string will be ABA.

The second way to decode 121 is:
12 = L
1 = A
Thus, the decoded string will be LA.

The third way to decode 121 is:
1 = A
21 = U
Thus, the decoded string will be AU.

So, there will be 3 ways to decode the sequence 121 i.e. [(ABA), (LA), (AU)].
Note:
The input sequence will always have at least 1 possible way to decode.    

As the answer can be large, return your answer modulo 10^9  + 7.
Follow Up:
Can you solve this using constant extra space?
Try solving now
02
Round
Easy
Online Coding Interview
Duration60 Minutes
Interview date2 Aug 2021
Coding problem1

This round was organized in day time from 2PM - 3PM
1 coding question and 1 code for debugging was given on the coderpad
Interviewer made it quite engaging with lot of discussions 
Time complexity and space complexity was also discussed in detail

1. Group Anagrams Together

Moderate
0/80
Asked in companies
Dell TechnologiesPayPalArcesium

You have been given an array/list of strings 'STR_LIST'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one another.

Note :
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase. We can generalize this in string processing by saying that an anagram of a string is another string with the same quantity of each character in it, in any order.
Example:
{ “abc”, “ged”, “dge”, “bac” } 
In the above example the array should be divided into 2 groups. The first group consists of { “abc”, “bac” } and the second group consists of { “ged”, “dge” }.
Try solving now
03
Round
Medium
Face to Face
Duration50 Minutes
Interview date14 Aug 2021
Coding problem1

This round began with detail introduction about me , college and my previous company. Then my projects were discussed in detail . Focus was on company projects, one machine learning based project done during college was also discussed in detail. 
There were 2 interviewers ,cross questioning one after other, but it was still a good conversation. I felt like it would be a rapid fire round due to 2 interviewers but it was really good , no pressure and discussion went quite well. After introduction, I was asked a trie based question and another one I approached using heap and interviewers were satisfied with answer of both solutions

1. Boyer Moore Algorithm For Pattern Searching

Moderate
30m average time
70% success
0/80
Asked in companies
Goldman SachsAmdocsGoogle inc

You are given a string ‘text’ and a string ‘pattern’, your task is to find all occurrences of pattern in the string ‘text’ and return an array of indexes of all those occurrences. You may assume that the length of ‘text’ is always greater than the length of ‘pattern’.

For example :
Let text = “this is a good place to have a good start”, pattern = “good” so you have to return {10, 31} because at 10 and 31 index pattern is present in the text.
Note :
If there is no such index in the text then just return an array containing -1.
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

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

Choose another skill to practice
Similar interview experiences
company logo
Analyst
3 rounds | 8 problems
Interviewed by Goldman Sachs
1218 views
0 comments
0 upvotes
company logo
Analyst
5 rounds | 7 problems
Interviewed by Goldman Sachs
2205 views
1 comments
0 upvotes
company logo
Analyst
6 rounds | 12 problems
Interviewed by Goldman Sachs
0 views
0 comments
0 upvotes
company logo
Analyst
3 rounds | 5 problems
Interviewed by Goldman Sachs
8167 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Analyst
3 rounds | 4 problems
Interviewed by Ernst & Young (EY)
2197 views
1 comments
0 upvotes
company logo
Analyst
2 rounds | 7 problems
Interviewed by Dunzo
875 views
0 comments
0 upvotes
company logo
Analyst
3 rounds | 9 problems
Interviewed by HCL Technologies
0 views
0 comments
0 upvotes