Online test

Held on Hackerrank, you are allowed to switch between sections. Each section has a separate timer, which will stop when you switch. One strategy could be to sacrifice some section (ML, since it was shit) and use that time for the other questions. Two sections can be done fully if you have some luck and you manage your time properly. Also note, GS will not use the entire test result to shortlist. Different teams will look at different things, so if you do really well in one section or two sections, you have a good shot at interview.

 

CS :

60 minutes, 5 MCQs, 2 coding questions. Each MCQ was +10/-3, Coding questions were +20, +30 with partial marking (although it wasn’t specified how much, and Hackerrank does show how many test cases passed)

(30) points

You are given a list of n tourist bookings (start date, duration), and the total number of tourists that can simultaneously be in the country. When processing bookings, you have to check if the current number of tourists existing are more than number allowed, and if so, deny the booking. O(n^2) was obviously giving TLE, it is possible to do it in O(nlogn)

(20) points

You are given a number (in the form of a string) and an integer k. You have to output the maximum palindromic number that can be formed from the given number and by using at most k changes to the number (replacing digits is the only allowed operations). Output -1 if it is not possible to get a palindrome.

 

MCQs :

  1. You are given a BST (filled with some 6-7 values), and the question was that how many input orders could be given such that you end up with the same BST. (As in, you are given a stream of input and you make a BST out of them normally without balancing etc, how many streams will give same BST) 
  2. We wish to solve Sudoku filling using graph coloring, by putting edge between nodes that can’t have the same number. What is the minimum number of nodes in this graph? Ans: 810
  3. Given a number (n bit long), what is the complexity of finding if the number is a power of 2? Ans – O(n) 
  4. What is the extra space complexity for maintaining next min element in a stack .Ans O(1)
  5. What is a possible output for n |= n>>1, n|= n>>2, n|= n>>4, … n|= n>>16, cout<<(n>>1) Ans: 127

ML :

10 questions, all MCQs, each +10/-3. Duration was 30 minutes

 

  1. X1 ~ N(0,1), X2 ~ N(2, 4), what is KL (X1||X2)
  2. Let w be an unbiased estimator for theta parameter in Unif(0,theta). Given n samples, what is an unbiased estimator for variance of w
  3. X ~ N(0,1). Let p denote cdf of x. Define y is random variable, y = s(log(p) – log(1-p)). What is cdf of y? Ans: 1/(1+e^(-y/s))
  4. Given n samples of a vector (X,Y), what is an unbiased estimator for cov(X,Y). The options were in terms of H, defined as the covariance of the sample.
  5. 3 people Alice, Bob and Charlie. Alice can shoot with probability 0.2, Bob with 0.5 and Charlie with 1. What is the probability of Bob surviving if they all were shooting in cyclic order. Ans: 13/30
  6. What kind of normalisation(mean, min-max) is applied before cosine similarity of word vectors. Ans – nothing, as it would lead to information loss (tentative answer)
  7. In time series, which method is used for testing? Window method, Shuffling method or k-fold cross validation. Ans – should be window I think, because everything else will destroy sequential nature of dat
  8. Another question on cosine similarity. Matrix of MxN. Whether the similarity would lie between [0,1] or [0,1) based on whether the rank of matrix was N and M>N. –
  9. Given that there are two coins of bias p and q, you define “event” as choosing a random coin among the two, and then tossing them thrice. Given outcomes as {HTT} and {TTH}, do expectation maximization once to find values of p, q. Start with p = 0.4, q  = 0.8

 

Quant : 

10 questions. 9 MCQs and one numerical type, all were +10, the MCQs had -3, numerical had no negatives.

  1. Straws weigh a random amount in unif(0,1). A camel can take a total weight of 1 before its back breaks. What is the expected weight of the last straw that breaks the camel’s back. Ans : 2-2/e = 0.64
  2. What is the expected number of straws that can be placed before the camel’s back is broken Ans : e
  3. Geometry question, obtuse triangle ABC was given (B being the obtuse angle). D was midpoint of BC. Angle ADB = 45, Angle ACB = 30. Find tan B Ans: -2-sqrt(3)
  4. Matrix was given, entries in first row were cos 1, cos 2, cos 3, … and so on, for n^2 entries. What is the limit as n tends to infinity of the determinant. Ans: 0 (https://math.stackexchange.com/questions/1003453/a-limit-determinant-question)
  5. M, N are drawn from unif(1,100) integers. What is the probability that 7^m + 7^n is divisible by 5. Ans : 0.25
  6. What is the probability that the first toss was heads given that r heads were observed in n tosses of a fair coin Ans : its r/n
  7. A and B play a game with each other. P(A wins) = 2/3. The loser of each round gives the winner 1$. What is the expected number of rounds they will play if A starts with 1$ and B starts with 2$. Ans : 15/7
  8. Another determinant simplification problem, you had to do basic R1 -> R1 – R2 type operations and extract common elements. 
  9. Number of minimum length of set such that there exists a subset that has sum divisible by 11. Ans : 11 https://math.stackexchange.com/questions/1939620/prove-that-there-is-at-least-one-subset-of-11-numbers-whose-sum-is-divisible-by
  10. x^2 + 2bx +c = 0 – what is the probability that this has real roots, given that b, c are drawn uniformly randomly from [-1, 1]. (Real distribution) Ans – 2/3

Shortlists are based both on your resume as well as test scores. Depending on how well you did in each section, different teams will shortlist you for interviews. For me, I had attempted 5 out of 5 coding MCQs correctly (And gotten one wrong), and 9 out of 10 quant questions(all 9 correct). I got a few tests cases right on the first coding question, that may have given me some more marks partially. ML section was totally garbage. This was enough to get me a shortlist in both the teams that look for coding skills (GS Technology) and teams that look for quant skills.

Goldman Sachs Interview Experience | Set 36 (On-Campus)

Goldman Sachs visits our campus every year for both campus placements and internships. Of late, their process has become pretty stable, they generally conduct a three part test online, followed by interviews on day 1 (December 1). I applied via the campus placement cell, was shortlisted for interview, and eventually was given an offer (which I accepted). This is an overview of both the test as well as the interview process I went through.

Similar Reads

Online test :

Held on Hackerrank, you are allowed to switch between sections. Each section has a separate timer, which will stop when you switch. One strategy could be to sacrifice some section (ML, since it was shit) and use that time for the other questions. Two sections can be done fully if you have some luck and you manage your time properly. Also note, GS will not use the entire test result to shortlist. Different teams will look at different things, so if you do really well in one section or two sections, you have a good shot at interview....

Interviews :

...