I’ve been in the interview loops with Goldman Sachs since the last week of August. Throughout this time, multiple recruiters have reached out for two different roles. Given that I have competing offers, the recruiters have been actively working to secure an offer for me, but due to their process, it’s taking time.
Round 1:
Online Assessment (OA): Two questions — one on Dynamic Programming and one on Graphs.
Round 2:
Screening Round: Two questions, both medium difficulty — one involving a character array (easy) and another related to finding max-min in an array (medium).
Super Day Rounds:
Round 3:
Problem 1: Rearrange an array containing both positive and negative numbers so that positive and negative numbers alternate. If there are more positive or negative numbers, they should appear at the end.
Input: [-1, 2, -3, 4, 5, 6, -7, 8, 9]
Output: [9, -7, 8, -3, 5, -1, 2, 4, 6]
Input: [-1, 3, -2, -4, 7, -5]
Output: [7, -2, 3, -5, -1, -4]
Problem 2: Find the majority element in an array of size n, where a majority element is an element that occurs more than n/2 times.
Input: [3,2,3,3,4,3]
Output: 3
Multiple questions on core Java, including HashMap internals, MultiMap, and complexities.
Round 4:
Problem 1: (Approach + Time/Space Complexity) Given n jobs with specific start and end times and profits, return the maximum profit that can be made without overlapping jobs.
Input: startTime = [1,2,3,3], endTime = [3,4,5,6], profit = [50,10,40,70]
Output: 120 (by choosing jobs [1-3] and [3-6]).
Problem 2: Puzzle involving 1000 bottles of wine and 10 prisoners to find the poisoned bottle in one test.
Problem 3: (Approach + Time/Space Complexity) Find the k closest points to the origin (0,0) in a 2-D array of points.
Input: points = [[0,2],[2,2]], k = 1
Output: [[0,2]]
Input: points = [[0,2],[2,0],[2,2]], k = 2
Output: [[0,2],[2,0]]
Problem 4: (Approach + Time/Space Complexity) Implement a class for shuffling a deck of n distinct cards. The method getNextCard() should return the next card from the shuffled deck without repetition.
Round 5:
High-Level Design (HLD): Design Twitter
Requirements:
Users should be able to tweet quickly.
User timeline: Display user’s tweets and retweets.
Home timeline: Display tweets from people the user follows.
Search timeline: Display results based on hashtags or keywords.
User should be able to follow others.
Celebrity tweets should reach millions of followers within 5 seconds.
Round 6:
Hiring Manager Round: A discussion about past experiences, future goals, work-life balance, and general conversation.
I'm in the team matching phase with Goldman Sachs. I’ve successfully passed all interview rounds, and the recruiter mentioned that both teams I interviewed with during the Hiring Manager round really liked my profile. However, the rest of the process will still take some time as it requires further approvals.