# Goldman Sachs Internship Interview Experience | Off-Campus 2021

I applied through the company’s career portal, applications opened on January 20, 2021, and closed on February 8, 2021.

I received an invitation for the Aptitude Test on the very next day of the application deadline. The test was scheduled for 20th February.

This test was conducted on the Hackerrank platform, it was divided into 6 sections which contained a total of 66 questions with an overall time limit of 90 minutes, There was video proctoring, and changing sections were allowed. The sections were-

- Numerical Computations — 8 questions
- Numerical Reasoning -12 questions
- Comprehension — 10 questions
- Abstract Reasoning — 12 questions
- Diagrammatic Reasoning — 12 questions
- Logical Reasoning — 12 questions

With a marking scheme of +5 and -2.

I solved around 48 questions and tried to avoid negative marking.

On 10th March, I received a mail stating I have cleared the aptitude test and the next step is a technical test scheduled on 20th March 2021.

**The test contained the following sections –**

- Programming — 1 Easy coding problem and one medium coding problem.
- Quantitative Aptitude — Multiple choice questions related to concepts of mathematics.
- Computer Science — Multiple choice questions related to concepts of Computer Science.
- Advanced Programming — A hard programming question on advanced data structures and algorithms.
- Tell Us About Your Self — Two paragraph-based behavioural subjective questions.

**Programming Section:**

- First programming question was given an array of n integers and a number k. we have to include the maximum number of elements from the array whose sum is less than k and output their sum.
- The second programming question was based on the level order traversal of the binary tree represented in an array format. We were supposed to complete the given function only but the problem setters left a mistake in the driver code which is the last thing anybody will check while debugging which made debugging the unexpected output of code very difficult.

** Quantitative Section:**

- Quantitative aptitude questions were based on a wide range of topics from mathematics including but not limited to trigonometry, probability, statistics, permutation, and combinations, etc.

**Computer Science Section:**

- Computer science questions were based on Data structures, sorting algorithms, graph algorithms, operating systems, scheduling algorithms, bankers algorithm, OOPS, JAVA, predict the output of the program, etc.

**Advanced Programming Section:**

- The advanced programming question was a 100 point question based on the graph. The problem description was quite vague, and I had to assume a lot to come up with a solution. I don’t remember the question precisely yet basically, we were supposed to find nodes with the best connectivity that is the ones with the most number of neighbours and whose neighbours are again with good connectivity.
- The test was webcam and microphone procured. Switching between sections was allowed, but every section had its individual time limits.
- On 31st March I received an email with information that I have cleared the technical test and will be interviewing virtually with a panel on a day between 5th to 9th April.
- On 2nd April I received the date and time of my interview. My interview was scheduled for 6th April, and I was supposed to be available from 10 AM to 5 PM. The entire process was to be conducted on the same day and zoom along with hackerrank codepair should be the platform.

6th April 2021

There were around 50 candidates in the waiting room, the process was progressing quite slow and had to wait a lot by just sitting in front of the laptop as the interview can start at any moment and the interviewer will already be there waiting for the candidate.

**Interview Rounds**

**Round 1**– It started at 12:05 PM (Yeah After waiting for 2 hours in front of a blank screen !). The Interviewer was a vice president at GS, she was very nice and polite. She begins with greetings and asked for my quick introduction. Then asked me to tell her something about the projects that I have mentioned in my resume. Then she asked DSA questions. The question were-

- Print all the pairs(unordered) in a given array which sums up to a given number k.
- Implement a song suggestion feature in the media player. Basically, two types of queries were there, one to play a song at time t and the other to tell which song is the most played song till now. First I told her the brute solution (count frequency of all songs every time). Then she asked me to optimize it with a data structure. I told her two solutions one with heap and another one with doubly-linked lists. She seems satisfied with my approach.

Finally, she told me if I had any questions for her, I can ask. The Interview lasted about 45min.

**Round 2**– Again after a long wait of 3 hours it started at 4 PM. The interviewer was a really cool and intelligent person. He directly jumped to DSA questions. He asked me 5 questions in total and asked me to code them all. Furthermore, he checked them with his test cases. The questions were-

- Given the stock price of a certain company for n days, you have to maximize your profit by buying and selling the stock such that you can perform only 1 transaction.
- The same question but now you can perform any number of transactions.
- Again the same but now I can perform almost k transitions. I used Dynamic programming for the same.
- Given a number N, you are supposed to print n,n-1,n-2….,1,0,1…..n-2,n-1,n using recursion and the recursion function must be called only once. I used another binary variable in my recursion function which tells whether it is in an increasing or decreasing state. The solution worked, but he didn’t seem satisfied and told me to think about a 3 line solution after the interview ends and surprisingly that solution hit me as soon as the interview ended XD.
- Given an array of numbers, print the unique numbers in it in the decreasing order of frequency of those numbers.

I wrote acceptable codes for all his problems, he looked satisfied and asked me if I had any questions for him.

**Round 3**– It started at 5:30 PM and was a hurried interview. The interview was asking questions too fast. He began directly with a DSA problem.

- Given an array of integers, You have to find any peak element where a peak element is a number whose previous and next numbers are both less than the given number. I gave him the brute force O(N) approach then he asked me if I can optimize it. Then I gave him the O(logN) approach.
- Now he asked to do the same problem but to find the greatest peak element. He asked if it is possible to do this in O(log N) time complexity, and how (The answer is no, O(N) solution should be the most optimal in this case). Then he asked why this happened.
- Moving on to his next question, find the square root of a given positive number (perfect square or non-perfect square, can be with decimal or without decimal) without using any library function.

I was made to write code for all his questions and run them against his test cases.

- Afterward, he asked me about my projects, what tech stack I used and why?
- Then he asked me to compare them with other tech stacks available and finally a couple of OS, OOPS short questions. He seemed satisfied.
- At last, he asked me to ask him questions if any.
- This interview was so hurried that the interview didn’t even last for 15 minutes including all the above questions and their codes.
- It was my last interview after which they ask me and few others to leave and results will be communicated within 2 weeks to those who were selected.

Finally, on 16th April, I received the email regarding my selection for the internship!

**My Tips-**

- Try to score maximum in the screening tests (not just the cut-off).
- Try to write good and effective answers for the paragraph-based questions in the technical round.
- Prepare a good answer for “Tell me about yourself” which highlights your strong points and divert the rest of the interview towards it.
- Try to approach DSA problem with the strategy of REACTO, you can refer https://content.techgig.com/answering-a-technical-question-in-a-coding-interview-a-step-by-step-guide/articleshow/81672857.cms
- At the end always ask questions to the interviewer which shows your passion and interest to work in the company.
- The interview process can be exhaustingly long and slow, be mentally prepared for the same.