Goldman Sachs Associate | 3+ Years Experience | Offer
- Result
- Offer
- Location
- Bangalore
- Experience
- 3 years
- Posted
- 17 Feb 2021
Summary
I successfully secured an offer for an Associate position at Goldman Sachs after completing a rigorous interview process spanning an online coding round and five subsequent technical and managerial interviews.
How it went
My interview process for the Associate role at Goldman Sachs was quite thorough, unfolding over approximately 2-2.5 months. It began with an online coding round on Hackerrank, where I tackled two easy coding questions within 120 minutes. After clearing this, my resume was shortlisted for further rounds.
Round 1 (Coderpad + Voice Call)
This round involved two easy-medium level questions on Coderpad. I had to write complete runnable code and pass all test cases.- Minimum Distance Between Two Words with Middle Character Definition: I was given a string and two words within it, and I needed to find the minimum distance between them. The distance was uniquely defined as the number of characters between the middle characters of the two words. An existing brute-force implementation with logical bugs was provided, and my task was to identify and fix these bugs, then add new test cases and implement code for them.
- Minimum Path Sum: I was asked to solve the classic 'Minimum Path Sum' problem.
Rounds 2-6 (Zoom Video Call + Coderpad)
These rounds were conducted on the same day, each lasting about 60-70 minutes.Round 2 (DSA)
After a quick introduction, we delved into data structures and algorithms.- Array Difference (with Occurrences): I was given two unsorted arrays and asked to find (arr1 – arr2) and (arr2 – arr1). The difference was defined as all elements from the first array not present in the second, critically considering the number of occurrences. For example, if
arr1 = [3, 5, 2, 7, 4, 2, 7]andarr2 = [1, 7, 5, 2, 2, 9], thenarr1 - arr2 = [3, 7, 4]andarr2 - arr1 = [1, 7]. - H-Index: I had to calculate the h-index for a given array of citations.
- H-Index II: This was a follow-up, asking for the h-index from a sorted array of citations.
- H-Index from Data Stream: The next follow-up involved calculating the h-index from a continuous stream of citations after each new input.
Round 3 (DSA, Projects)
This round involved a detailed discussion about the projects I had worked on, including technologies and design patterns used.- Balance a Binary Search Tree: I was asked to balance an imbalanced BST, returning a balanced version with the same node values.
- Maximum Number of Events That Can Be Attended: This problem involved finding the maximum number of events that could be attended given a list of events with start and end days.
- Numeric Puzzle: ABCD * 4 = DCBA: I was presented with a puzzle to find the values of A and D for a 4-digit number ABCD such that ABCD * 4 equals DCBA.
Round 4 (Java, Design)
This round began with an introduction and technical discussion about my most recent project.- HashMap Internal Working: I had to explain the internal working mechanism of a HashMap.
- JVM Architecture: I discussed the architecture of the Java Virtual Machine.
- Java vs. Other OOP Languages: I explained how Java differs from other object-oriented programming languages.
- Java Garbage Collector Details: We had a detailed discussion on the Java Garbage Collector.
- Relational Database Design: I was asked to design a relational database and explain the data structures I would use in its implementation.
Round 5 (Hiring Manager)
This was a hiring manager round.- Design a Garbage Collector: I was asked about how I would design a garbage collector if given the task.
- Wrapper Class in Java: I explained what a wrapper class is and why it is needed in Java.
- Type Erasure in Java: I also elaborated on type erasure in Java and its purpose.
- Reason for Leaving Current Organization: I discussed my reasons for wanting to leave my current role.
- Why Goldman Sachs?: I articulated my motivations for joining Goldman Sachs.
Questions asked (20)
- 01
String Encoding-Decoding with Counts
Data Structures & Algorithms · Medium
Open the problemGiven a string, encode and decode it. For example, input: "AABC", output: "A2B1C1". Decoded back to the original string. Follow up: What if the characters are numbers? "123" should output "112131". Follow up: What if the string is mixed with characters and numbers? "A1B2" should output "A111B121".
- 02
Minimum Distance Between Two Words with Middle Character Definition
Data Structures & Algorithms · Medium
Given a string and two words (which occur in the given string), find the minimum distance between them. The distance is defined as the number of characters between the middle characters of the two words. I was provided with a brute-force implementation containing logical bugs, and my task was to identify and fix these bugs, add new test cases, and write code for them.
- 03
Minimum Path Sum
Data Structures & Algorithms · Medium
Open the problemGiven an
m x ngrid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. You can only move either down or right at any point in time. - 04
Array Difference (with Occurrences)
Data Structures & Algorithms · Medium
Given two unsorted arrays,
arr1andarr2, find the difference(arr1 - arr2)and(arr2 - arr1). The difference(A - B)is defined as all elements from arrayAthat are not present in arrayB, considering the number of occurrences. For example, ifarr1 = [3, 5, 2, 7, 4, 2, 7]andarr2 = [1, 7, 5, 2, 2, 9], thenarr1 - arr2 = [3, 7, 4]andarr2 - arr1 = [1, 7]. - 05
H-Index
Data Structures & Algorithms · Medium
Open the problemGiven an array of integers
citationswherecitations[i]is the number of citations a researcher has had for theirithpaper, return the researcher'sh-index. - 06
H-Index II
Data Structures & Algorithms · Medium
Open the problemGiven an array of integers
citationswherecitations[i]is the number of citations a researcher has had for theirithpaper, return the researcher'sh-index. Your algorithm should run inO(log n)time. - 07
H-Index from Data Stream
Data Structures & Algorithms · Hard
Given a continuous stream of citations, calculate the h-index after each new input.
- 08
Balance a Binary Search Tree
Data Structures & Algorithms · Medium
Open the problemGiven the
rootof a binary search tree, return a balanced binary search tree with the same node values. If there is more than one answer, return any of them. - 09
Maximum Number of Events That Can Be Attended
Data Structures & Algorithms · Medium
Open the problemYou are given an array of
eventswhereevents[i] = [startDayi, endDayi]. Every eventican be attended on any day fromstartDayitoendDayi(inclusive). You can only attend one event at a time. Return the maximum number of events you can attend. - 10
Numeric Puzzle: ABCD * 4 = DCBA
Other · Easy
Given a 4-digit number ABCD, where ABCD * 4 equals DCBA (the reversed number), find the values of digits A and D.
- 11
HashMap Internal Working
Other
Explain the internal working mechanism of a HashMap.
- 12
JVM Architecture
Other
Describe the architecture of the Java Virtual Machine (JVM).
- 13
Java vs. Other OOP Languages
Other
Discuss the key differences between Java and other object-oriented programming languages.
- 14
Java Garbage Collector Details
Other
Provide a detailed discussion on the Java Garbage Collector.
- 15
Relational Database Design
System Design
How would you design a relational database, and which data structures would you use in its implementation?
- 16
Design a Garbage Collector
System Design
If tasked with designing a garbage collector, how would you approach its design?
- 17
Wrapper Class in Java
Other
Explain what a wrapper class is and why it is needed in Java.
- 18
Type Erasure in Java
Other
Explain what type erasure is in Java and its purpose.
- 19
Reason for Leaving Current Organization
Behavioral
What are your reasons for seeking to leave your current organization?
- 20
Why Goldman Sachs?
Behavioral
Why are you interested in joining Goldman Sachs?