Following are the details of my interview with Goldman Sachs.
Round 1: Online Coding Round conducted on Hackerrank (1.5 hours)
The online test was of 100 points
It comprised 5 MCQs of 10 points each, with penalty of 3 point each for wrong answer.
There were 2 coding questions of 15 and 35 points respectively.
First Coding Question –
Given a sentence, find the even length word of maximum length. In case of a tie, find the word which occurs earlier in the sentence. In case no such word exists, print “00”.
Second Coding Question –
A greedy question almost similar to this question.
21 students were shortlisted after this round.
Round 2: F2F Technical Round 1 (30 minutes)
- Discussion on the projects and the technologies used in implementing those
- Questions related to OOPS – Inheritance, Garbage collection in JAVA, Virtual functions in C++
- HashTable Vs HashMap, Static Scope, Local Scope, Diamond Problem
- Linear Probing Vs Quadratic Probing, Run Time Polymorphism
- Implement a Library System
- References Vs Pointers, Why do we need references when we have pointers?
- Reverse the linked list using both recursive as well as iterative way.
- Delete a node from a BST
- Search an element in an infinite sorted array with minimum possible complexity
- Implement stack in such a way that it always acts as a min-stack
- Several Moral Questions where I was provided certain situations, and how I would have tackled them
- Why GS?
11 students were shortlisted for the next round.
Round 3: F2F Technical Round 2 (1 hour 15 minutes)
- I was asked an algorithmic question as follows-
You are provided a sentence, and several queries.
Queries will be the following type – (Word 1, Word 2). For the given pair of words, find the minimum difference between their starting indices in the given sentence. Case sensitivity must not be taken into consideration.
For example – If the sentence is “I like rabbits and rats. Rabbits are cute.”
Query – (“rabbits”, “rats”).
Now there are 2 possible combinations of this pair. Find the minimum possible difference.
Make a vector corresponding to each of the word present, which shall store its occurrences in the increasing order in the sentence.
Now, whenever a query is input, choose the vector corresponding to the word which has less number of elements.
Let the two vectors be A and B respectively ( Size of A <= Size of B )
Traverse the vector A, and for each of the element, find the value just smaller to it, and the value just larger than it in vector B.
This can easily be carried out using Binary Search. Find minimum difference over the entire traversal of vector A.
The interviewer carried out dry run on my solution, and checked it on several corner cases. He was satisfied with my solution.
- Second question was related to BST.
You are provided a BST, which is corrupted. One of the nodes in it has 2 parents. Let’s say those are parent 1 and parent 2. It is ensured that none of these parents will be the ancestor of the other. Identify the node, and remove the link of the wrong parent.
Identify the node which has 2 parents by making use of some visited array.
Now, find LCA of both the parents.
The value of LCA shall tell us if the corrupted node should lie on its left or on its right.
By this, we can remove the link of the wrong parent.
- Several puzzles. Most of them were from here.
- OS Questions- LRU Cache, Banker’s Algorithm, Semaphore vs Mutex
- DBMS Questions- Transactions, ACID Properties, Several SQL Queries like GROUP BY, ORDER BY,
Aggregate functions, Views Vs Tables, Triggers, Joins
Round 4: HR Round (25 minutes)
- Discussion with respect to my resume
- Discussion regarding my JEE Rank and Board Score
- State atleast 5 reasons why we should hire you
- State atleast 3 reasons why Goldman Sachs is better than the company where I had an intern
- Brief discussion regarding my role as Teaching Assistant in Algorithms Course for Juniors
Thanks Geeksforgeeks for being a perfect platform for practice. 🙂
This article is contributed by Shivam Garg (shivam_isc) . If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Goldman Sachs Interview Experience | Set 23 (2+ years Experience for Java Developer Role)
- Goldman Sachs Interview Experience | Set 39 (1.5 years experience)
- MathWorks Interview Experience (EDG, Oncampus)
- ServiceNow Interview Experience Oncampus
- UHG Interview Experience | OnCampus- 2019
- InfoEdge Interview Experience | OnCampus-2019
- Goldman Sachs Interview Experience | Set 5
- Goldman Sachs Interview Experience | Set 5 (On-Campus)
- Goldman Sachs Interview Experience | Set 6
- Goldman Sachs Interview Experience | Set 7
- Goldman Sachs Interview Experience | Set 9 (On-Campus for Internship)
- Goldman Sachs Interview Experience | Set 10 (On-Campus)
- Goldman Sachs Interview Experience | Set 11 (On-Campus for Strats Division)
- Goldman Sachs Interview Experience | Set 12 (On-Campus)
- Goldman Sachs Interview Experience | Set 13 (On-Campus for Internship)
- Goldman Sachs Interview Experience| Set 14 (1+ Years Experienced)
- Goldman Sachs Interview Experience | Set 15 (On-Campus for Internship)
- Goldman Sachs Interview Experience | Set 16 (For 2+ Years Experienced)
- Goldman Sachs Interview Experience | Set 17 (On-Campus for Analyst)
- Goldman Sachs Interview Experience | Set 18 (Off-Campus)