Goldman Sachs Interview Experience | On-Campus Internship
Online Test:
There was a online test on hackerrank platform which comprised of Coding and Quants(Probability and General Maths mostly) section.
-
- Coding Question 1: You’re given a DFA: number of states, starting state, accepting states list, it’s transition table. How many strings of length l can be accepted by it?
- Coding Question 2: It was modified Camel Banana Puzzle(https://www.geeksforgeeks.org/puzzle-15-camel-and-banana-puzzle/). In the original puzzle, camel needs a banana to move. In this question, camel eats a banana if its carrying some but it can move even if it carries no banana at all.
- Coding Question 3(Advanced): I don’t remember the problem well. There were 4 friends in a 2D matrix, each can move in any of the 4 directions(N, S, E, W). Given there initial coordinates, find the point where they should meet such that some of distance covered by each of them is minimized.
- Coding Puzzles(I remember only these):
- https://stackoverflow.com/questions/3719150/square-of-a-number-being-defined-using-define
- What’s the output of this snippet: https://ide.geeksforgeeks.org/nS7QOeQcUv ? Compile time error, runtime error, rubbish?
- Suppose a const int pointer is initialized with value 6 in C++. Can you ++ it? If yes, what’ll be its output when you try to access it: 7 or some garbage value?
- Quants MCQ(I remember only these):
- https://www.quora.com/Four-points-are-chosen-uniformly-at-random-on-the-surface-of-a-sphere-What-is-the-probability-that-the-center-of-the-sphere-lies-inside-the-tetrahedron-whose-vertices-are-at-the-four-points
- a+b+c+d = 63. What’s max(a*b+b*c+c*d)? All are naturals(Ans is 891)
- You keep on throwing a dice and add the digit that appears to a sum. You stop when sum >= 100. What’s the most frequently appearing digit in all such cases? 1 or 6 ?
- Sum of two tan inv numbers (https://www.emathzone.com/tutorials/math-results-and-formulas/formulas-for-sum-and-difference-of-inverse-trigonometric-functions.html)
- Simple integral of an expression (involving sin(x), cos(x))
- Two subjective questions. What’s the biggest challenge ever faced in your life? What’s the most difficult feat that you’ve achieved in your life?
Interview 1:
First few minutes we both formally introduced ourselves. Then the interviewer asked to discuss the project I’m most comfortable with. Then asked how to mirror a tree(https://www.geeksforgeeks.org/write-an-efficient-c-function-to-convert-a-tree-into-its-mirror-tree/). Then asked how to optimize it further(saying there were a million nodes in the tree). I responded that I cannot think of any other way. Then I was hinted to use parallelization. I told to use ThreadpoolExecutor in Java, but interviewer insisted on a C++ based solution using fork(). I couldn’t come up with a way.
Interview 2:
Firstly formal introduction. Then discussion about my projects. Then interviewer asked me a standard question (https://www.geeksforgeeks.org/find-pythagorean-triplet-in-an-unsorted-array/). I came up with a O(n^2*logn) solution but interviewer wanted a better answer. I was provided hints and finally I came up with a O(n^2) solution. Then asked me what’s the limit of ratio of two fibonacci numbers (https://www.quora.com/How-is-the-golden-ratio-related-to-Fibonacci-numbers/answer/Gary-Meisner). I knew the derivation already so I told about golden ratio and derived it.
I didn’t have any HR round. It seemed that interviewers were asking the same set of questions to every candidate they were interviewing. I was selected in the extended list.
Food for thought:
An interviewer was asking really good maths related questions, and none of the candidates answered all of them. I didn’t have an interview with that interviewer, but I really liked a problem. You choose 10 numbers randomly from 1 to 100(inclusive). Then prove that you can always choose two subsets from those 10 elements such that their sum is equal.(Hint: use pigeonhole principle)
Recommended Posts:
- Goldman Sachs Interview Experience | Set 29 (For Internship)
- Goldman Sachs Interview Experience | Set 30 (For Internship)
- Goldman Sachs Interview Experience | Set 31 (For Internship)
- Goldman Sachs Interview Experience (On-Campus for internship)
- Goldman Sachs Interview Experience (On-campus for Internship)
- Goldman Sachs-Internship Interview Experience(On Campus)
- Goldman Sachs Interview Experience | Set 9 (On-Campus for Internship)
- Goldman Sachs Interview Experience | Set 25 (On-Campus for Internship)
- Goldman Sachs Interview Experience (On Campus for Internship)
- Goldman Sachs Interview Experience | Set 15 (On-Campus for Internship)
- Goldman Sachs Interview Experience | Set 13 (On-Campus for Internship)
- Goldman Sachs Interview Experience (For Internship, on campus)
- Goldman Sachs Interview Experience | Set 27 (On-Campus for Internship)
- Goldman Sachs Interview Experience (On-Campus for internship)
- Goldman Sachs Interview Experience | Set 26 (On-Campus for Internship)
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.



