# Big Cheating in Goldman Sachs test

There was huge cheating going on Goldman Sachs Test which was conducted on 18-August 2018 through Telegram app. People are openly asking solutions in that group.

pls do something

3 Likes

You can email Goldman Sachs with relevant proof screenshots etc. Thatâ€™s all you can do, decisions still lie in their hands.
Cheaters wonâ€™t get past the interviews, but theyâ€™ll take up seats of viable candidates though.

5 Likes

Wrong site . This is codechefâ€¦

5 Likes

On what platform this test was conducted ?

1 Like

It was conducted on hackerrank

1 Like

I wonder what kind of firm these days doesnâ€™t ask for webcam ? They should have conducted test on interviewbit or even if on hackerrank, then webcam and full screen mode would have been much much better.

7 Likes

I was frankly surprised as wellâ€¦
I gave the test, and they asked for us to be in business casuals(for the exam)
and the camera wasnâ€™t even switched on!

1 Like

Or mera to infytq ka xam diya tha tab se on haiâ€¦lolâ€¦

2 Likes

for the second round right?
Most of the exams i have given are proctoredâ€¦

Yesâ€¦ tumne diya tha

Slipped out of my mind
I gave GS
solved two coding questions thatâ€™s all

In goldman I solve 2 questions full and 1 half(3 test cases) all mcq and essay

How did you solved the 2nd question. I kept on getting segmentation fault.
I did this:
``` #define MAX 1001 int pf[MAX];```

int getfactorization(int x){
int sum = 0;
// vectorans;
while(x!=1){
sum += pf[x];
x = x/pf[x];
}
return sum;
}

int binomial(int n, int k){

``````int i,j;
int C[n+1][k+1];

for(i=0;i<=n;i++){
for(j=0;j<=min(n,k); j++){

if(j == 0 || j == i){
C[i][j] = 1;
} else{
C[i][j] = C[i-1][j-1] + C[i-1][j];
}

}
}

return C[n][k];
``````

}

int getSubsets(int k, int n, vector arr) {
pf[0] = 0;
pf[1] = 1;
for(int i=2;i<MAX;i++){
pf[i] = i;
}

``````for(int i=4;i<MAX;i+=2){
pf[i] = 2;
}

for(int i=3;i*i<MAX;i++){

if(pf[i] == i){

for(int j=i*i;j<MAX;j+=i){

if(pf[j] == j){
pf[j] = i;
}

}

}

}

int finalsum = 0;

for(int i=0;i<n; i++){
finalsum += getfactorization(arr[i]);
}

return binomial(finalsum-1, k-1);
``````

}

Then I did this:

``` #include using namespace std; int binomial(int n, int k) { int C[n + 1][k + 1]; int i, j; // Caculate value of Binomial Coefficient // in bottom up manner for (i = 0; i <= n; i++) { for (j = 0; j <= min(i, k); j++) { // Base Cases if (j == 0 || j == i) C[i][j] = 1; // Calculate value using previously // stored values else C[i][j] = C[i - 1][j - 1] + C[i - 1][j]; } } return C[n][k]; } int primeFactors(int n) { int sum = 0; // Print the number of 2s that divide n while (n % 2 == 0) { sum += 2; n = n/2; } // n must be odd at this point. So we can skip // one element (Note i = i +2) for (int i = 3; i <= sqrt(n); i = i + 2) { // While i divides n, print i and divide n while (n % i == 0) { sum += i; n = n/i; } } // This condition is to handle the case when n // is a prime number greater than 2 if (n > 2) sum += n; return sum; } int getSubsets(int k, int n, vector arr) { int finalsum = 0; // cout<<â€śheloâ€ť; for(int i=0;i<n; i++){ finalsum += primeFactors(arr[i]); } // cout<<finalsum; return binomial(finalsum-1, k-1)+2; // } int main(){ int k = 2; int n = 3; vectorarr; for(int i=0;i<n;i++){ int val; cin>>val; arr.push_back(val); } cout<<getSubsets(k, n, arr); } ```

Both time I got segmentation fault.
Can anyone pls share his approach ??

C[i-1][j-1],C[i-1][j] when i=0 is probably why you are getting segmentation fault.

Answer is n+k-1 C k-1 ,where n is sum of prime factor

2 Likes

Who informed you about these examsâ€¦? I never knewâ€¦

college groupsâ€¦Plus I am in 4th year so i have to be aware of these!!

4 Likes

@shim98 hey! I also in my last year. Do you know of any common hub where I can find about these contest for hiring? Or probably you could tell about more contests like this.

3 Likes

as such i am not sure.
i just have my college groupsâ€¦