# Goldman Sachs Interview Experience

Round 1 (Online coding round):
This was a 2 hours long round, which consisted of 4 sections- Coding, Quant, Subjective, and Advanced.

#### The Coding section comprised of 2 questions.

Question 1: Given an array, starting from the beginning of the array till it’s end, whenever you encounter the number ‘2’, add another ‘2’ just after it. In doing so, the last element in the array would be removed, because the final array should be the same size as the initial one. For example, if the initial array is [23, 2, 3, 12, 2, 2, 34, 55, 66, 79], then the modified array should be [23, 2, 2, 3, 12, 2, 2, 2, 2, 34]. Expected time complexity is O(n) and you should do it in place (using only constant amount of extra memory).

#### The Quant section consisted of about 10 questions.

These were mixed questions on Probability, Computer Architecture, Operating Systems, High School Mathematics, and Discrete Mathematics. You can expect anything related to Maths and Computer Science in this section.

#### The Subjective section consisted of 2 questions.

Question 1: You have your final examinations from next week, and you also have your interview of your dream company next week. You cannot attend your exams if you want to give your interview. What would you do?

Question 2: You see that your President has leaked the exam documents on social media before it’s commencement. What do you do?

#### The advanced section consisted of 1 question.

The length of question was large. I don’t exactly remember the question. But once you understand the question the logic and very clear and easy.

I did both the questions of the coding section, and about 7 questions of quant section, and of course both the questions of the subjective section. 29 students were called for interviews, and most of them did both questions of the coding section.

## Round 2 (Interview Round 1 (on-campus)):

The shortlisted candidates were called for interviews.  He asked me about myself. I gave him my introduction and my interests. Then he started discussing one of the projects that I mentioned in my resume. We discussed about the project for about 20 minutes, and he was looking quite happy with the answers. He asked me about my favorite data structure. I said Linked List, Tree, Arrays. He continued with asking me 1 puzzle. https://www.geeksforgeeks.org/puzzle-9-find-the-fastest-3-horses/. He asked me 2 coding question and write code for both of them on paper.

1). Find maxSumPath in a binary tree. https://www.geeksforgeeks.org/find-maximum-path-sum-two-leaves-binary-tree/

2). Find Fixed point in an array. (binary search solution). https://www.geeksforgeeks.org/find-a-fixed-point-in-a-given-array/

All the puzzles asked by interviewer to different candidate were available on geeksforgeeks.org.

## Round 3 (Interview Round 2 (on-campus)):

I was called for second round of interview. The interviewer asked me how my last interview went. Then he jumped straight to questions. He asked me two quite easy questions.

1). First one was to find common number in 3 sorted array. https://www.geeksforgeeks.org/find-common-elements-three-sorted-arrays/

2). Explain the amortized analysis of Quick sort algorithms.

One puzzles was also asked in this interview round. https://www.geeksforgeeks.org/puzzle-18-torch-and-bridge/

Round 4 (Interview Round 3 (on-campus)):

I was called for third round of interview. The interviewer asked about my internship and course projects which I had mentioned on the resumes. Then he jumped straight to questions. He asked me one coding question he wanted me to write code including all the corner cases.

1). You have to partition an array such that both side contains element of equal sum. I explained him bottom-up dp solution and wrote code and dry run the test cases. https://www.geeksforgeeks.org/partition-problem-dp-18/

6 students were selected for the SDE position, and I was one of them. I would suggest you  to brush up your coding basics and be confident during the interview process.

Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.