Discover your dream Career
For Recruiters

Goldman's toughest tech interview problem and how to solve it

Nobody is expecting a tech interview at Goldman Sachs to be easy, but just how difficult can it get? Using Leetcode, we can find the answer.

Parth Vyas, a software engineer at Microsoft, formerly of RBC, researched which coding problems on Leetcode are most likely to come up in tech interviews. Though his research was FAANG focused, one problem popped up as particularly prevalent at Goldman Sachs, and it's one of the hardest.

That problem is Trapping Rain Water, and involves computing on a graph how much water would be stored by a receptacle. This is the visual representation they give.

Writing on Leetcode, one engineer says he was "struggling with this problem for days" but for Ben Dickey, software engineer at IT consulting firm CGI, the solution took about two minutes. The video below shows how he solved the problem:

When Goldman Sachs asks the question, it may complicate matters, though. One user said that in their interview, they were subsequently asked:

"Suppose a '0' in the input means that there is a leak at that position and the water can leak out. After the adjustment, that is, after the water levels have stabilized due to leaking, what is the answer?"

Goldman isn't the only place that loves this challenge. Amazon and Bloomberg are also known to use it/ Being able to solve place you in good stead for some of the highest paying technology jobs in finance.

Click here to create a profile on eFinancialCareers. Comment ANONYMOUSLY on articles and make yourself visible to recruiters hiring for top jobs in technology and finance. 

Have a confidential story, tip, or comment you’d like to share? Contact: alex.mcmurray@efinancialcareers.com in the first instance. 

Bear with us if you leave a comment at the bottom of this article: all our comments are moderated by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. Eventually it will – unless it’s offensive or libelous (in which case it won’t.)

author-card-avatar
AUTHORAlex McMurray Editor
  • ph
    photobug56
    9 February 2023

    Is there even a slight connection between success in a job and this sort of thing? Mind you, after 40 years in tech and tech related things, mostly in banking, actual real life problem solving, good tech and business understanding, and when I was coding, understanding the computer languages and systems were important.

  • GA
    GA
    6 February 2023

    Yep, I was asked this question. It took me a lot more time and some hints from the interviewer to finish it.

    P.S.: I didn't pass the second interview.


Sign up to our Newsletter!

Get advice to help you manage and drive your career.

Boost your career

Find thousands of job opportunities by signing up to eFinancialCareers today.
Recommended Jobs
Cobalt Recruitment
Private Equity- Investment Analyst
Cobalt Recruitment
London, United Kingdom
Bruin
Portfolio Manager
Bruin
London, United Kingdom
Vertus Partners
Quant Analyst - Front Office - London
Vertus Partners
London, United Kingdom
Metis Search
Investment Analyst - Direct Lending
Metis Search
London, United Kingdom

Sign up to our Newsletter!

Get advice to help you manage and drive your career.