Goldman Sachs is no stranger to the world, as one of the world's longest-established and largest investment banks. Since its founding, it has evolved into one of the world's leading financial institutions, known for its unique corporate culture and keen insight into the marketplace. Recently, I just finished the Goldman Sachs SDE OA interview, and here I have organized the interview process and encountered the questions, to the students who want to submit their resumes to do a reference~.
Goldman Sachs SDE Interview Process
- Online Assessment: 2 algorithmic questions (topics close to real business scenarios, upper Medium)
- Round 1: DSA In-Depth Examination
- Round 2: DSA + Big Data Processing
- Round 3: DSA + Low Level Design
- Round 4: System Design + Design Patterns
- Round 5: Behavioral + Hiring Manager
Goldman Sachs SDE Detailed question review
Online Assessment
Question 1: Calculate the least removal operation so that all characters in a string appear the same number of times.
I misunderstood this question at first and thought it was a dynamic programming problem, but the Programhelp voice reminded me that the core idea is to count the frequency of characters and then sort them, using a head-to-tail pairing strategy. So I first paired the capacity and cost of each Pod and sorted them by cost from highest to lowest. Then I traverse these Pods, and for each Pod, check if its capacity value is already occupied; if it is occupied, keep increasing the capacity value until I find an unoccupied value. Finally, we return the accumulated total cost and we are done.
Question 2: Minimum cost to make the number of microservices mutually exclusive
I did the same type of problem before the interview, and I complicated the problem by writing dynamic programming. Then the senior at Programhelp got to the heart of the matter: it's standard "sorting + greed". The key point is to first sort the Pods from highest to lowest cost (this is very important! (This is important! Higher costs are processed first to avoid being pushed repeatedly). Then iterate, if the current capacity value is already occupied, keep adding 1 until you find a free position, this increase in the number of steps is the cost. Along these lines, the minimum total cost is quickly calculated.
Round 1
The first one is Distinct Subsequences, a classic DP problem, I wrote a 2D DP solution, then the interviewer asked me to optimize the space complexity, and I got stuck, but Programhelp prompted me to "optimize for rolling arrays", and then I finished the problem. The second question was to implement an in-place program that would optimize the spatial complexity of an in-place program. The second question was to implement an in-place sorting algorithm that doesn't use extra space. I was a bit confused when I saw the requirements, and the interviewer asked me about quicksort and heap sort, and I chose quick sort. The key is to be able to optimize from the bruteforce solution to the optimal solution step by step, and to clearly explain the time and space complexity. The interviewer is quite nice and will give hints, but you have to show clear thinking.
Round 2
This round was pretty fast paced and the two questions were in different styles. Luckily, Programhelp had simulated similar scenarios before the exam. The first one was Maximal Square, a classic 2D DP question. I almost made a mistake in writing the state transfer equation, but luckily I remembered a similar type of question that I practiced in the simulation - using dp[i][j] to represent the length of the side of the maximal square with (i,j) as the lower-right corner, and the key is in the transfer logic of min(top, left, top-left)+1. The interviewer nodded his head and asked about spatial optimization. Programhelp reminded me of the idea of using rolling arrays to compress to O(n). The second question was about big data sorting. When I saw the limit of 2GB file and 250MB memory, I remembered the external sorting framework that Programhelp emphasized. The idea is to sort by chunks and then merge by k-way. When the interviewer asked me about the details of the merge phase, I mentioned that I used the minimal heap to manage the current elements of each chunk, which is an exact replica of the solution that was simulated before the exam!
Round 3
- First 30 minutes DSA: Maze 2 problem, request to solve and optimize with BFS.
- 30 Minutes After LLD: Designing Splitwise Applications
The DSA part is fine, but the LLD is a real test of comprehensive skills. You have to start with requirements gathering, define classes, and design relationships. The key is to have a structured approach, first clarify requirements, then design classes and interfaces, and finally discuss scalability and edge cases Time is limited, no code is required, but the idea should be clear.
Round 4
System Design + Design Patterns is the hardest round, 1 hour divided into two parts, in-depth discussion of the current project architecture and the application of Design patterns and OOP principles. The interviewer directly asked me to draw the architecture diagram of the current project and asked me the reason for each technology selection. When I mentioned the use of message queues to decouple services, I was asked about message loss, duplicate consumption, and order guarantee, and Programhelp reminded me of the retry mechanism, idempotent design, and partitioning strategy. I got stuck on the multi-threading application of the builder pattern, and admitted that I had limited experience in this area. With the help of Progranhelp, I analyzed the example of managing the builder with the factory pattern, and the idea went smoothly at once.
Round 5
The final round was 30 minutes long and consisted of 4-5 behaviora questions. This round was relatively easy and focused on culture fit and communication skills, the key is to prepare stories in STAR format, I told a story that was polished by Programhelp before the exam, which demonstrated leadership and problem-solving skills, from technical solution justification, to securing support from key people, to implementation strategy. I told a story that Programhelp had polished up before the exam.
Programhelp Helping you get the Big House Offer!
Need interview support? Come to Programhelp~We can provide remote help without trace, real-time voice reminder, on behalf of the interview, written test remote control on behalf of the writing and other professional services, and successfully help many students successfully pass the top tech interviews like Goldman Sachs! The interviews with big companies are not that scary, we accompany you to pass steadily!