Open In App
Related Articles

Goldman Sachs Interview Experience | On-Campus Internship

Improve Article
Save Article
Like Article

Online Test:

There was an online test on hackerrank platform which comprised of Coding and Quants(Probability and General Maths mostly) section.

    1. 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?
    2. Coding Question 2: It was modified Camel Banana Puzzle( In the original puzzle, the camel needs a banana to move. In this question, camel eats a banana if it’s carrying some but it can move even if it carries no banana at all.
    3. 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 their initial coordinates, find the point where they should meet such that some of the distance covered by each of them is minimized.
    4. Coding Puzzles(I remember only these):
      • What’s the output of this snippet: ? 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?
    5. Quants MCQ(I remember only these):
      • a+b+c+d = 63. What’s max(a*b+b*c+c*d)? All are naturals(Ans is 991)
      • 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 (
      • Simple integral of an expression (involving sin(x), cos(x))
    6. 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( 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 the interviewer insisted on a C++ based solution using fork(). I couldn’t come up with a solution.
Interview 2:

Firstly formal introduction. Then discussion about my projects. Then the interviewer asked me a standard question ( I came up with an O(n^2*logn) solution but the interviewer wanted a better answer. I was provided hints and finally, I came up with an O(n^2) solution. Then asked me what’s the limit of the ratio of two Fibonacci numbers ( I knew the derivation already so I told about the 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 on 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 the 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)

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 21 Nov, 2019
Like Article
Save Article
Similar Reads