I am a pre-final year student from IIT(ISM) Dhanbad.
I would like to share my Goldman sachs interview experience with the Leetcode community.
First round was an online test which consisted of 2 easy coding question and a hard codinng question along with few aptitude questions and CS fundamentals questions. Also there were 2 situation based questions. Total time alloted was 2 hrs 15 mins.
Second Round was a technical interview. They just asked my introduction and discussed about my projects. After that, they asked a simple coding question. The question was:
I am given an array arr[] and another array rotate[] i have to return another array whose index i stores the index of the position of the maximum element of the arr after it is left rotated rotate[i] number of times.
Third round was also a technical interview. many questions were asked during this round.
- what is the probability of getting exactly 2 heads if 5 unbiased coins are tossed simultaneously.
- There is a staircase at which 4 people are standing say 1 2 3 4 all are facing in such a way that they are moving downstairs and are in the order 1 2 3 4 (4 at the top). Now, there is a theif who has a gun and is pointing towards them and is sideways. so, they cannot see the theif and also they can only see the persons who are in front of them (they can not move their heads or mutter anything among them). The theif asked them a question and said if they will solve it he will let them free otherwise kill all of them. Assume there is a virtual wall between 3 and 4 so that 4 can not see any of the persons in front of him. The theif had 2 green and 2 red hats. He placed one hat on top of every person and asked if anyone of them can answer correctly about which colour hat they are wearing. Note that if any of them gives a wrong answer the theif will kill all of them.
- There was a coding question. I was given an arr and i have to perform max k operations and return the minimum value of sum of the array elements possible. In each operation you can select any element of the arr and replace it with the ceil value when divided by 2.
Constraints:
- 1<=arr.length<=10^5
- 1<=arr[i]<=10^4
- 0<=k<=10^7
- It was another puzzle. I am given 8 identical balls. One of them is defective and is heavier than others. You have a balance. Everytime you use the balance it costs 1 coin. What is the minimum cost to figure out which among the 8 is the heavier ball. (I answered it then the interviewer asked me to calculate the value for 26 balls).
Verdict: Rejected (I didn't solved the coding question completely also didn't gave the correct answer for the last puzzle with 26 balls SedLyf).