Goldman Sachs Analyst Interview experience

goldman sachs logo
goldman sachs
Analyst
June 9, 20256 reads

Summary

I applied for an Analyst position at Goldman Sachs via referral and went through a multi-stage interview process including Hackerrank, CoderPad, and several technical and system design rounds. Despite performing well in earlier stages, nervousness during the final technical and hiring manager round led to my eventual rejection.

Full Experience

I applied through a referral and got hackerrank link on March 30th and completed on that day.

Questions on Hackerrank test (Round-1):

  1. Decode ways question : https://leetcode.com/problems/decode-ways/
  2. Some Dp question involving coin denomination, don't remember exactly.

I was able to complete both questions with all test cases passing.

On April 7th, Hr scheduled Coder pad round and in this round I was able to code both questions optimally and got few followups for few test cases as well.

Questions asked on coder pad round(Round-2):

  1. https://leetcode.com/problems/robot-bounded-in-circle/description/
  2. https://leetcode.com/problems/trapping-rain-water/description/ with some modifications.

After a week I got a call from hr for the next round and it happened on 24th april. In this round I was asked one dsa question related to Graphs and i was able to come up with brute force approach and not able to optimize it. Later I was asked HLD of an e commerce website had discussion around what are different microservices i would require, what db i'm going to choose and tradeoffs and asked to write code for login page of the ecommerce website.

Exact Dsa question asked: You are given an array of objects, where each object contains the following properties:

name: a string representing the name of the object.

parentId: an integer representing the ID of the parent object. If the object has no parent, this value is null.

id: an integer representing the unique ID of the object.

Your task is to create a method that generates all possible paths from the root objects (objects with no parent) to the leaf objects (objects with no children). Each path should be represented as a list of names, starting from the root object and ending at a leaf object.

Example

Given the following array of objects:

List nodes = Arrays.asList(

new Node("A", null, 1),

new Node("B", 1, 2),

new Node("C", 1, 3),

new Node("D", 2, 4),

new Node("E", 3, 5)

{'1': ['2','3'],'2' :['4'],'3':['5']}

{'1':[{'2':[4]},{'3':[5]}]}

);

The method should return the following paths:

[

["A", "B", "D"],

["A", "C", "E"]

]

Constraints

The array of objects will not contain any cycles.

Each object will have a unique id.

The array may contain multiple root objects.

Objective

Implement the method findPaths that takes a list of Node objects and returns a list of paths, where each path is a list of names from the root to a leaf.

Next day I got call from hr and mentioned i will have two interviews on the same day and due to unavailability of me and panel it got postponed to may 7th.

Round-3: In this interview they asked about my current project details, what i have implemented, why we used certain things and later i was asked about what design patterns were used in my project. We had discussion around Factory design pattern, what is the necessity of factory design pattern and asked about singleton design pattern as well. Later I was asked two dsa questions and i was able to solve one completely and other one started with brute force and got to optimal approach,interviewer satisfied with my approach but didn't get enough time to code.

Dsa questions asked in this round:

  1. https://leetcode.com/problems/backspace-string-compare/description/
  2. https://leetcode.com/problems/first-missing-positive/

Due to some internet issue, next round that is supposed to happen on the same day got rescheduled to 13 th may.

Round-4: In this round, had discussion around my resume about my previous and current projects and discussed how we handle negative scenarios in my project and asked to write singleton design pattern first i write normal lazy instantiaion code, later i was asked to write without using synchronized keyword and i'm not aware of it. Had some questions about runnable and callable. What is synchronized keyword and some questions related to it. Was asked to design a system which will need to display all rows in a table in real time and in the db we will have millions of rows. I was also given a question related to strings, which i don't remember exactly and i'm unable to solve that.

After Round 4 I got call from Hr mentioning ,you will have final tech plus hiring manager round which was scheduled on May 19th. Round-5 (Final Technical plus Hiring manager round): In this round , had discussion around my resume, projects and standard questions like why are you looking for a change, why GoldmanSachs. Later it shifted to technical side and I was given this code and asked identify the possible bug .


public int add (int a,int b){
    int c = a + b;
    return c;
}

We discussed around overflow possibility and he asked to me write code to prevent it and throw an error, i was little nervous in this round and not able to write completely and the next question is to write generic max method which will take a class and returns the max value specified by the client, I didn't understand the question exactly after multiple followups and due to my nervousness, i'm unable to complete the code for this question. Next question was what data structures you will use and how do you handle if you have resturant and you want to maximize the staff utilization for taking orders from resturants, you will have customers, waiters, chefs.The goal is to maximize the staff utilization by the resturant. My approach is using queues and didn't answered properly how we can use threadpool after using queues to maximize the utilization and screwed up the interview. Later asked one behavioral question.

After so much preparation due to my nervousness I screwed up my last round and got rejected.

#GoldmanSachs #InterviewExperience #BestOfluck

Interview Questions (14)

Q1
Decode Ways
Data Structures & AlgorithmsMedium

Problem statement from LeetCode link.

Q2
Robot Bounded In Circle
Data Structures & AlgorithmsMedium

Problem statement from LeetCode link.

Q3
Trapping Rain Water (with modifications)
Data Structures & AlgorithmsHard

Problem statement from LeetCode link, with some modifications mentioned by the interviewer.

Q4
Generate All Paths from Root to Leaf in Object Tree
Data Structures & Algorithms

You are given an array of objects, where each object contains the following properties:

name: a string representing the name of the object.

parentId: an integer representing the ID of the parent object. If the object has no parent, this value is null.

id: an integer representing the unique ID of the object.

Your task is to create a method that generates all possible paths from the root objects (objects with no parent) to the leaf objects (objects with no children). Each path should be represented as a list of names, starting from the root object and ending at a leaf object.

Example

Given the following array of objects:

List nodes = Arrays.asList(

new Node("A", null, 1),

new Node("B", 1, 2),

new Node("C", 1, 3),

new Node("D", 2, 4),

new Node("E", 3, 5)

{'1': ['2','3'],'2' :['4'],'3':['5']}

{'1':[{'2':[4]},{'3':[5]}]}

);

The method should return the following paths:

[

["A", "B", "D"],

["A", "C", "E"]

]

Constraints

The array of objects will not contain any cycles.

Each object will have a unique id.

The array may contain multiple root objects.

Objective

Implement the method findPaths that takes a list of Node objects and returns a list of paths, where each path is a list of names from the root to a leaf.

Q5
E-commerce Website High-Level Design
System Design

High-level design (HLD) of an e-commerce website. Discussion around different microservices required, database choice and tradeoffs. Asked to write code for the login page of the e-commerce website.

Q6
Design Patterns Discussion (Factory, Singleton)
Other

Discussion around Factory design pattern, its necessity, and Singleton design pattern.

Q7
Backspace String Compare
Data Structures & AlgorithmsEasy

Problem statement from LeetCode link.

Q8
First Missing Positive
Data Structures & AlgorithmsHard

Problem statement from LeetCode link.

Q9
Singleton Design Pattern Implementation
Other

Implement Singleton design pattern. Initially, a normal lazy instantiation code was requested. Follow-up was to implement it without using the synchronized keyword.

Q10
Java Concurrency Concepts (Runnable, Callable, Synchronized)
Other

Questions about Runnable and Callable. What is the synchronized keyword and some questions related to it.

Q11
Real-time Display of Millions of Database Rows
System Design

Design a system which will need to display all rows in a table in real-time, where the database contains millions of rows.

Q12
Integer Overflow Bug Identification
Other

Given code: public int add (int a,int b){ int c = a + b; return c; } Asked to identify possible bugs (integer overflow) and write code to prevent it and throw an error.

Q13
Generic Max Method
Other

Write a generic max method which will take a class and returns the max value specified by the client.

Q14
Restaurant Staff Utilization System Design
System Design

Design a system for a restaurant to maximize staff utilization (customers, waiters, chefs) for taking orders. The goal is to maximize staff utilization.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!