I have interviewed with Goldmanc sachs in Nov-17. The process is very slow as in my case first round was started in Sept-17 and last round ended in Nov-17.
Round 1: First was the HackerRank Test. Two Coding questions, first easy ,second Medium to Hard Level.
Note: I do not remember the exact wording of the question.
1.) Given an string and a burst length , output the string such that count of same adjacent characters in string are less than burst length.
Input : abbcaaaccd , 3
2.) Given an array of distinct integers, output the number of sub-sequences of length 3, either in increasing or decreasing order.
Tips: Prepare Dynamic Programming as almost every time second question is of DP.
Round 2: CoderPad
Here two questions were asked :
- A robot can only move in four directions , UP(U), DOWN(D),LEFT(L),RIGHT(R). Given a string consisting of instructions to move , output the co-ordinates of robot after the executing the instructions. Initial position of robot is at origin(0,0).
- Given an array of integers and a sum, output the number of pairs whose addition is equal to the given sum.
Tips: In CoderPad round first discuss your algorithm with the interviewer. Interviewer excepts you to write professional level code. Also interviewer will ask you to write all possible test cases especially corner test cases and your code should pass it.
Round 3: Video Conference
In this round lots of technical questions were asked to check to in-depth knowledge of the C++ language.
Some questions i remember are:
- Introduce yourself
- What is Virtual keyword, how vtable works, virtual destructor.
- Exception handling in C++, C++14(if you claim to know c++14)
- Lots of scenarios related to run-time polymorphism are given and asked what will be the output and why
- STL containers Map, Set, unordered_map.
- Difference between map and unordered_map in C++, their implementation details.
- Real world uses of map, set, unordered_map.
- Thread safety of STL containers.
- smart pointers like unique_ptr, shared_ptr, weak_ptr. Usecases and differences among them.
- Algorithm Question: Given a matrix of integers , find the sub matrix with the maximum sum.
After this round and a month wait, i was called for face to face discussion in GS Bangalore. All the below round were happened in GS Bangalore and in single day. For each round there were two interviewers.
Round 4: Face to Face
Again lots of questions on C++ :
- Virtual mechanism
- Pure Virtual function uses
- Pure virtual function vs virtual function
- Output prediction : Given some C++ code , what will be output and why.( I do not remember the exact questions but one case was of run-time polymorphism and second one was of local reference returned from a function)
- Algorithm questions
C++ questions :
- Implement assignment Operator Overloading , copy constructors.
- Different types of cast and difference between them
- Up Cast and Down cast, why and how they works.
- Diamond problem and how to resolve it.
- How virtual inheritance works internally.
- Algorithm questions :
- Given a linked list with only three possible numbers 0,1,2, sort the list.
- Given a array of sorted but repeated integers , find the number of occurrence of a given number.
Design Question : Design a mobile directory i.e. the list of contacts to save mobile number , email and other information. All operations which we can do in our mobile like searching by name , number etc.
Algorithm Question : Given two strings s1, s2. output all the ways in which these two strings can be merged while keeping the order of character same as they were in s1, s2. Design a recursive algorithm.
Example : s1 : ab , s2: cd
So guys, hope you will find it useful for your interview preparation. Best of luck!!!
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!