Goldman Sachs Interview Experience Salt Lake City, US

goldman sachs logo
goldman sachs
Salt Lake City, US
June 1, 20253 reads

Summary

I experienced a Coderpad interview, followed by a Superday consisting of three rounds (Data Structures and Algorithms, Resume Depth, System Design). Despite solving several problems and attempting others, I ultimately received a rejection email after three weeks.

Full Experience

Goldman Sachs Coderpad Interview -> I was asked two questions

  1. Given a 2D grid, each cell has a item which has value >=0, we are standing at bottom left cell of the grid and need to reach top right cell. We can travel in right and up direction. E.g.

0 0 5 0 1 0 2 0 1
Ans : 8

  1. A popular online retailer allows vendors to specify different prices in advance for the same item throughout the day. We now need to design an algorithm that helps identify the lowest price for the item at any point of the day.

Assumptions:

For the algorithm, assume all vendors are selling the same product and there is only one product being sold. Given a list that has vendor information - ( startTime, endTime, price ) of the deal, return a sorted list with different possible intervals and the least price of the product during the interval.

The interval is inclusive of start and end time.

All the 3 values passed by the vendor are integers.

sampleInput = { new Interval( 1, 5, 20 ), new Interval( 3, 8, 15 ), new Interval( 7, 10, 8 ) }; expectedOutput = { new Interval( 1, 3, 20 ), new Interval( 3, 7, 15 ), new Interval(7,10,8)};

I solved first question starting with brute force recursive approach and was able to pass all the test cases. Then I was telling optimized solution by memoization and bottom up tabulation but interviewer said brute force is fine and moved to 2nd Question. For 2nd question I was not able to solved it completely interviewer was friendly and gave me hints after hints I was able to write code completely but was not able to run it as time was over. Interviewer was pushing me to write production level code eg. appropriate variable names, function names for eg. I used i, j for row , column for 1st question he asked me to change it to row, column.

After 3 days I got email for Superday. My superday had 3 rounds of 45 mins each.

  1. Data Structures and Algorithms -> 2 Interviewers joined the call. Started with introduction. Then asked role specific questios like 1) How will you setup mongoDB cluster? 2) How will you configure your application for MongoDB using Springboot. DSA question asked was as follows :-
  1. List indicating a book. Each element in the list represents one page of the book. The page is space delimited.
  2. List Glossary word list

Output: Create a glossary for each word in the glossary list which indicates page numbers where the word occurs.

I was able to solve this question. Then as time was still left so they asked question what if you have huge data and limited CPU RAM how will your sort the data? -> I told merge sort and discussing on the same.

  1. Resume Depth - Interviewer grilled on resume. I struggled to answer few questions like I worked on TOCTOU issue and for resolving this issue I used atomicOperation. Then interviewer went to underlying details of atomic operations how it works and how will you implement atomic operation function and then taking this question to hashMap about how will handle concurrnecy in hashMap? I was not able to answer this question thoroughly.

  2. Design and Architecture round - > I was asked Design Rate Limiter. I was able to design but at the end while discussing about scalability I failed to answer one question which what will you if your redis cache is out of memory? I knew concept of data sharding but got blank not able to answer it properly.

I got rejection email after 3 weeks.

Interview Questions (8)

Q1
Maximize Path Sum in 2D Grid (Right/Up Movement)
Data Structures & Algorithms

Given a 2D grid, each cell has an item which has value >=0. We are standing at the bottom left cell of the grid and need to reach the top right cell. We can travel only in the right and up direction. E.g.

0 0 5 0 1 0 2 0 1
Ans : 8

Q2
Find Lowest Price Intervals for an Item
Data Structures & Algorithms

A popular online retailer allows vendors to specify different prices in advance for the same item throughout the day. We need to design an algorithm that helps identify the lowest price for the item at any point of the day.

Assumptions:

For the algorithm, assume all vendors are selling the same product and there is only one product being sold. Given a list that has vendor information - (startTime, endTime, price) of the deal, return a sorted list with different possible intervals and the least price of the product during the interval.

The interval is inclusive of start and end time.

All the 3 values passed by the vendor are integers.

sampleInput = { new Interval( 1, 5, 20 ), new Interval( 3, 8, 15 ), new Interval( 7, 10, 8 ) }; expectedOutput = { new Interval( 1, 3, 20 ), new Interval( 3, 7, 15 ), new Interval(7,10,8)};

Q3
MongoDB Cluster Setup and Springboot Configuration
Other
  1. How will you setup mongoDB cluster? 2) How will you configure your application for MongoDB using Springboot.
Q4
Generate Book Glossary with Page Numbers
Data Structures & Algorithms

Given:

  1. List indicating a book. Each element in the list represents one page of the book. The page is space delimited.
  2. List Glossary word list

Output: Create a glossary for each word in the glossary list which indicates page numbers where the word occurs.

Q5
Sort Huge Data with Limited CPU RAM (External Sort)
Data Structures & Algorithms

What if you have huge data and limited CPU RAM, how will you sort the data?

Q6
Explain and Implement Atomic Operations (TOCTOU Context)
Other

I worked on TOCTOU issue and for resolving this issue I used atomicOperation. Then interviewer went to underlying details of atomic operations, how it works, and how will you implement an atomic operation function.

Q7
Handle Concurrency in HashMap
Other

How will you handle concurrency in a HashMap?

Q8
Design a Rate Limiter
System Design

Design Rate Limiter.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!