Related Articles

# Goldman Sachs Interview Experience for Java Developer (3+ Years Experienced)

• Difficulty Level : Hard
• Last Updated : 14 Dec, 2020

Online coding round (Hackerrank): 2 easy coding questions; Time: 120 minutes

1. Game of Book Cricket.
2. Simple string encoding-decoding problem. https://leetcode.com/discuss/interview-question/334671/goldman-sacks-july-2019-hackerrank-2

After clearing the online test, resume shortlisting takes place and if your resume is shortlisted, further rounds will be conducted.

Round 1 (Coderpad + voice call): Two easy-medium level questions were discussed and you need to write the complete runnable call and pass all the test cases.

1. Given a String and two words (which occur in the given string), find the minimum distance between two words. Distance between two words is defined as the number of characters between the given two words’ middle characters. The brute-force approach was already implemented but it had some logical bugs, and because of which sample test cases were failing. The objective was to find and fix those bugs and then to add some new test cases and write a code for those test cases as well.
2. Simple DFS + DP in a 2D matrix to find the minimum cost path.

Note: Round 2 – 6 (Each round took around 60-70 minutes, all rounds were on the same day, Zoom Video Call + Coderpad):

Round 2(DSA):

1. Quick introduction
2. Find the difference between two arrays: Two unsorted arrays are given, and you need to find (arr1 – arr2) and (arr2 – arr1). The difference between the two arrays is defined as all the elements from the first array which are not present in the second array, taking the number of occurrences into consideration.

Example:

```arr1: [3, 5, 2, 7, 4, 2, 7] arr2: [1, 7, 5, 2, 2, 9]
arr1 – arr2 = [3, 7, 4]
arr2 – arr1 = [1, 7]```
3. Given an array of citations, calculate the researcher’s h-index. https://leetcode.com/problems/h-index/

4. The Follow-up question was: https://leetcode.com/problems/h-index-ii/

5. Next follow-up question: What if we are getting a continuous stream of citations, and we need to calculate the h-index after each input?

Round 3 (DSA, Projects mentioned in the resume):

1. A detailed discussion about the projects I have worked on and technologies and design patterns I have used.
2. Given an imbalanced BST, return the balanced BST.
3. Given the start and end times of the meetings, find out the maximum number of meetings one can attend. https://leetcode.com/problems/maximum-number-of-events-that-can-be-attended/
4. Puzzle: Given a 4-digit number ABCD, ABCD * 4 = DCBA (reversed number), find the values of A and D.

Round 4 (Java, Design):

1. Introduction and technical discussion about my recent project
2. OOPS questions
3. HashMap internal working
4. JVM architecture.
5. How is Java different than other object-oriented programming languages?
6. Detailed discussion on Garbage collector
7. You need to design a relational database; how will you design it? Which data structures will you use?
8. Find the top 3 horses puzzle.

Round 5 (Hiring Manager):

1. Quick introduction
2. If you are to design a garbage collector, how will you design it?
3. What is wrapper class and why do we need it?
4. What is type erasure and why do we need it?
5. Why do you want to leave the current organization?
6. Why GS?
7. He explained my role in the team

Hired!

The interview experience was smooth and it was very well arranged. On average, the whole procedure takes about 2-2.5 months to complete.

Tips:

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon. GoogleE-Litmus and Microsoft Test Serieses.

My Personal Notes arrow_drop_up