Goldman Sachs interview experience Real time questions & tips from candidates to crack your interview

Software Engineer Intern

Goldman Sachs
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
So, when i came to college i was new to coding.I got to know about competitive programming and DSA from my seniors. So without wasting much more time i started learning about C++ and all related stuff. Initially i was facing a lot of problem in finding the logic of the DSA problems but slowly and gradually with a lot of practise i saw quite good improvement in my logic and problem solving skills. After that i decided to practise daily i started giving contests daily and solving at least one problem daily on Leetcode. When our campus placements started i was confident and i cracked Tekion Corp very early during our placement season. So according to me consistency and dedication are two main keys to success.
Application story
I simply applied on the company's website and before interviews there were two rounds. first one was aptitude round and second one was technical assessment.
Why selected/rejected for the role?
i rejected because i believe i was not able to explain my solution to the interviewer in the best possible way as i can and interviewer seems a little bit of unsatisfied.
Preparation
Duration: 24 months
Topics: Dynamic Programming, Graphs, Tries, Trees, OOPs
Tip
Tip

Tip 1 : Try to give each and every question there on leetcode and try to upsolve them as well.
Tip 2 : quality matters but quantity also matters, so try to solve as many questions as you can. 

Application process
Where: Other
Eligibility: No criteria, just resume shortlisting
Resume Tip
Resume tip

Tip 1 : you should have at least 2 projects done completely by yourself so that you can handle any query asked by interviewer.
Tip 2 : try to mention all your achievements related to competitive programming.

Interview rounds

01
Round
Medium
Video Call
Duration40 mins
Interview date25 Mar 2022
Coding problem2

The round was totally based on data structure and algorithms.

1. Inorder Traversal

Easy
32m average time
0/40
Asked in companies
MakeMyTripWells FargoAmazon

You have been given a Binary Tree of 'n' nodes, where the nodes have integer values. Your task is to return the In-Order traversal of the given binary tree.


For example :
For the given binary tree:

The Inorder traversal will be [5, 3, 2, 1, 7, 4, 6].
Problem approach

Do left recursion then push then Do right recursion

Try solving now

2. Ninja and his meetings

Moderate
20m average time
80% success
0/80
Asked in companies
AmazonOracleIntuit

Ninja has recently started a startup. In his startup, there is only one conference room for a meeting. Ninja receives an array/list ‘MEETINGS’ of back-to-back appointment requests and is debating which ones to accept. Ninja needs a 15-minute break between appointments, and therefore he cannot accept any adjacent requests.

Ninja has to find the highest total booked minutes in the conference room for all meetings.

Note: All meeting timings are multiples of 15.

For example:

‘MEETINGS[]’ = {30, 15, 60}

Let us assume the meeting starts at 12:00 o’clock.
The first meeting takes 30 minutes so after the first meeting time is 12:30.
Then Ninja cannot attend the second meeting which is for 15 minutes because he needs 15 minutes break after every meeting.
After a 15 minutes break, he can attend the next meeting which is for 60 minutes.

So the total booked minutes for the meetings is 30 + 60 = 90.
Problem approach

Sort events increased by start time.
Priority queue pq keeps the current open events.

Iterate from the day 1 to day 100000,
Each day, we add new events starting on day d to the queue pq.
Also we remove the events that are already closed.

Then we greedily attend the event that ends soonest.
If we can attend a meeting, we increment the result res.

Try solving now
02
Round
Easy
Video Call
Duration40 mins
Interview date25 Mar 2022
Coding problem2

This round was again based on data structures and algorithms in which interviewer shares an hackerrank link with me and there he gives me two problems to solve. I don't remember the problems but one problem was easy and other was medium. I was able to do both the problems.

1. Longest Increasing Subsequence

Moderate
30m average time
65% success
0/80
Asked in companies
IBMVisaOYO

For a given array with N elements, you need to find the length of the longest subsequence from the array such that all the elements of the subsequence are sorted in strictly increasing order.

Strictly Increasing Sequence is when each term in the sequence is larger than the preceding term.

For example:
[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.
Problem approach

This is a classic Dynamic Programming problem.
Let dp[i] is the longest increase subsequence of nums[0..i] which has nums[i] as the end element of the subsequence.

Try solving now

2. Longest Palindromic Substring

Moderate
20m average time
80% success
0/80
Asked in companies
WalmartIBMSamsung

You are given a string ('STR') of length 'N'. Find the longest palindromic substring. If there is more than one palindromic substring with the maximum length, return the one with the smaller start index.

Note:
A substring is a contiguous segment of a string.

For example : The longest palindromic substring of "ababc" is "aba", since "aba" is a palindrome and it is the longest substring of length 3 which is a palindrome, there is another palindromic substring of length 3 is "bab" since "aba" starting index is less than "bab", so "aba" is the answer.

Problem approach

Initialize two variables, oddCount to store the number of characters with an odd count of occurrences and an unordered map ump to store the count of each character in the string.
Iterate through the string and for each character ch, increment the count of that character in the unordered map.
If the count of the current character ch is odd, increment oddCount. If the count is even, decrement oddCount.
If oddCount is greater than 1, return s.length() - oddCount + 1, which is the maximum length of a palindrome that can be formed by using all but one character with an odd count of occurrences.
If oddCount is not greater than 1, return s.length(), which is the length of the original string, as all characters can be used to form a palindrome.

Try solving now
03
Round
Easy
Video Call
Duration30 mins
Interview date25 Mar 2022
Coding problem2

This round was again based on dsa and problem solving.

1. Trapping Rain Water

Moderate
15m average time
80% success
0/80
Asked in companies
HCL TechnologiesCiti BankAtlassian

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Problem approach

For each element in the array, we find the maximum level of water it can trap after the rain, which is equal to the minimum of maximum height of bars on both the sides minus its own height.

Try solving now

2. Combination Sum

Easy
15m average time
85% success
0/40
Asked in companies
UberFacebookLinkedIn

You are given an array 'ARR' of 'N' distinct positive integers. You are also given a non-negative integer 'B'.


Your task is to return all unique combinations in the array whose sum equals 'B'. A number can be chosen any number of times from the array 'ARR'.


Elements in each combination must be in non-decreasing order.


For example:
Let the array 'ARR' be [1, 2, 3] and 'B' = 5. Then all possible valid combinations are-

(1, 1, 1, 1, 1)
(1, 1, 1, 2)
(1, 1, 3)
(1, 2, 2)
(2, 3)
Problem approach

This was a problem where we have to explore all possibility, make each combination and if sum of a combination becomes equal to target sum then we have to store that possible combination in our answer array.

One more thing we have to notice here is that, for a particular element we have unlimited choice i.e we can choose a element as many times as we want.

But their is some restiction also on choosing a number.

See for every number in making our target sum, we have two possibility i.e

Whether to include that element in making our target sum.
Whether not to include that element in making our target sum.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
Software Engineer Intern
2 rounds | 3 problems
Interviewed by Goldman Sachs
1203 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by Goldman Sachs
1374 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Goldman Sachs
906 views
0 comments
0 upvotes
company logo
Python Developer
3 rounds | 9 problems
Interviewed by Goldman Sachs
700 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer Intern
4 rounds | 4 problems
Interviewed by Microsoft
1378 views
0 comments
0 upvotes
company logo
Software Engineer Intern
3 rounds | 9 problems
Interviewed by NCR Corporation
1260 views
0 comments
0 upvotes
company logo
Software Engineer Intern
2 rounds | 2 problems
Interviewed by CIS - Cyber Infrastructure
613 views
1 comments
0 upvotes