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: firstname.lastname@example.org 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.)