Goldman Sachs Interview Experience | Off-Campus (September-2020)

26 Apr, 2021
I was contacted by a recruiter through Linkedin. At that time I had just started in an XYZ firm as a software engineer. I had forwarded my resume, after 2 months I got a call from HR to have an online round.
Coding Round: 2 coding questions on HackerRank to be solved in 2 hours. Both the questions are very easy, and I was able to solve both of them completely in a very short time.
Run Length EncodingMinimum Initial Energy Required To Cross Street
Run Length Encoding
Minimum Initial Energy Required To Cross Street
After a week, I got a call from HR to schedule a Coderpad round
CoderPad Round (1 hour): In this round, the interviewer will be on a call with you and you have to write the code in the coderpad(an online code editor) which is visible to the interviewer as well. The interviewer will type the question on coderpad and you have to write the code and it will be tested on multiple cases. Two questions were asked, and I was able to solve both of them.
Given an array scores [][] = {“jerry”,”65”},{“bob”,”91”}, {“jerry”,”23”}, {“Eric”,”83”}} Find the student with highest average scoreTrapping Rain Water
Given an array scores [][] = {“jerry”,”65”},{“bob”,”91”}, {“jerry”,”23”}, {“Eric”,”83”}} Find the student with highest average score
Trapping Rain Water
Round 1 (Zoom Interview-1 hour): There were 3 questions asked by two interviewers.
This was an adhoc type of problem. They only ask about my thought approach, no code is required. Given a stream of packets, in one second you can process only 10 packets. But more than 10 packets may arrive in a second. Suggest a proper DS/Algorithm to manage this scenario. Well, I was not sure of the solution, I suggested a queue and two pointer-based approaches. but he didn’t seem quite satisfied. He seems to be more concerned about some other approach. Then he jumped to the next question.Smallest subarray with sum greater than a given value. I was able to solve this problem. This is a famous question that is often asked in their interviews. I gave both brute-force and optimized approach and wrote the code.https://leetcode.com/problems/bus-routes/Initially, I suggested a connected component approach that  was wrong, Then I suggested a DFS based approach once he told me an example test case. He didn’t ask to code as it was almost the time and seem satisfied.
This was an adhoc type of problem. They only ask about my thought approach, no code is required. Given a stream of packets, in one second you can process only 10 packets. But more than 10 packets may arrive in a second. Suggest a proper DS/Algorithm to manage this scenario. Well, I was not sure of the solution, I suggested a queue and two pointer-based approaches. but he didn’t seem quite satisfied. He seems to be more concerned about some other approach. Then he jumped to the next question.
Smallest subarray with sum greater than a given value. I was able to solve this problem. This is a famous question that is often asked in their interviews. I gave both brute-force and optimized approach and wrote the code.
https://leetcode.com/problems/bus-routes/Initially, I suggested a connected component approach that  was wrong, Then I suggested a DFS based approach once he told me an example test case. He didn’t ask to code as it was almost the time and seem satisfied.
Round 2 (Zoom Interview-1 hour): There were 3 questions asked by two interviewers. Again on the same day.
Implement rand3() using rand2(). Honestly, I have never seen this type of problem. My question is little different. Given 3 functions.  
Implement rand3() using rand2(). Honestly, I have never seen this type of problem. My question is little different. Given 3 functions.  
 
def rand2(){
      return 1 with 0.5 probability
      otherwise return  0
}
def rand3(){
     return 1 with 0.33 probability
     otherwise return  0
}
def rand4(){
     return 1 with 0.25 probability
     otherwise return  0
}
You need to convert rand2() to rand3() and rand2() to rand4(). I  think this is some bit manipulation question and told the answer using bitwise and to convert rand2() to rand4(). He said okay then says use a similar method to convert rand2() to rand3(). I was not able to pick it up for a few minutes, then he jumped to the next question.Find the minimum path from the given source and destination and also find all such paths. We are allowed to move in all 8 directions and the cost from moving one cell to its adjacent other is one. I told a BFS based approach to get the minimum path and again applying BFS to get all such paths. He didn’t ask code and seemed satisfied.https://leetcode.com/problems/last-stone-weight-ii/Well, I know the easy version of it but didn’t know about the medium version of this question. I solved using the priority queue approach, but he made a test case where this logic fails. I was thinking about some other approaches but can’t figure out that this is a DP problem. After seeing me struggling he concluded the interview.
You need to convert rand2() to rand3() and rand2() to rand4(). I  think this is some bit manipulation question and told the answer using bitwise and to convert rand2() to rand4(). He said okay then says use a similar method to convert rand2() to rand3(). I was not able to pick it up for a few minutes, then he jumped to the next question.
Find the minimum path from the given source and destination and also find all such paths. We are allowed to move in all 8 directions and the cost from moving one cell to its adjacent other is one. I told a BFS based approach to get the minimum path and again applying BFS to get all such paths. He didn’t ask code and seemed satisfied.
https://leetcode.com/problems/last-stone-weight-ii/Well, I know the easy version of it but didn’t know about the medium version of this question. I solved using the priority queue approach, but he made a test case where this logic fails. I was thinking about some other approaches but can’t figure out that this is a DP problem. After seeing me struggling he concluded the interview.
I guess this is it me. Few things which I notice during the interview. First, they ask a lot of previously asked questions, so be ready for that. Second, they didn’t ask a very tough question, GFG and Leetcode are enough. Third, Have a good grasp of probability and puzzles. Fourth, try to be very interactive, even if you don’t think of an approach, communicate whatever you think to the interviewer.
Hope this helps, All the best...
Goldman Sachs
Marketing
Off-Campus
Interview Experiences
Goldman Sachs
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.