Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Goldman Sachs interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

Goldman Sachs
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 Months
Topics: Data Structure, Algorithms, Dynamic Programming, Operating System, System Design
Tip
Tip

Tip 1 : Practice at least 300 coding questions.
Tip 2 : Also focus on your aptitude quantitative.
Tip 3 : Do some good projects.

Application process
Where: Campus
Eligibility: 7 CGPA
Resume Tip
Resume tip

Tip 1 : Don't write anything on your resume which is not correct.
Tip 2 : Mention some good projects on your resume.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration135 minutes
Interview date5 Oct 2020
Coding problem3

-> The test had 5 sections and the duration is 2 hours 15 minutes. All sections are mandatory.
-> The Coding section had 2 programming questions and the duration was 30 mins.
-> The CS multiple-choice section had 7 MCQs and the duration was 25 mins.
-> The Problem Solving multiple-choice section had 8 MCQs and duration was 20 mins.
-> Each MCQ earns you 5 marks for the correct answers and -2 for incorrect answers.
-> The Advanced section had 1 programming question and the duration was 45 mins.
-> The Subjective section had 2 questions and the duration was 15 mins.

1. Rearrange Odd and Even Places

Moderate
25m average time
75% success
0/80
Asked in companies
OlaGoldman Sachs

You are given the 'head' of a singly linked list. Your task is to group all the nodes with odd indices together followed by the nodes with even indices, and return the reordered list’s head.


The first node is considered odd, and the second node is even, and so on.


Note:
Keep in mind that reordering is to be done according to the indexes and not the node values.
Also, ensure that the relative order inside both the even and odd groups should remain as it was in the input.


Example:
Input: 'head' -> 1 -> 3 -> 5 -> 7

Output: 'head' -> 1 -> 5 -> 3 -> 7

Explanation:
The nodes with odd indices (1, 5) are grouped together, followed by the nodes with even indices (3, 7).


Try solving now

2. LCA In A BST

Moderate
15m average time
85% success
0/80
Asked in companies
ShareChatSamsungAmazon

You are given a binary search tree of integers with N nodes. You are also given references to two nodes 'P' and 'Q' from this BST.


Your task is to find the lowest common ancestor(LCA) of these two given nodes.


The lowest common ancestor for two nodes P and Q is defined as the lowest node that has both P and Q as descendants (where we allow a node to be a descendant of itself)


A binary search tree (BST) is a binary tree data structure which has the following properties.

• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.


For example:
'P' = 1, 'Q' = 3
tree = 2 1 4 -1 -1 3 -1 -1 -1,

The BST corresponding will be- 

Here, we can clearly see that LCA of node 1 and node 3 is 2.
Try solving now

3. Smallest Window

Moderate
10m average time
90% success
0/80
Asked in companies
GoogleHSBCSnapdeal

You are given two strings S and X containing random characters. Your task is to find the smallest substring in S which contains all the characters present in X.

Example:

Let S = “abdd” and X = “bd”.

The windows in S which contain all the characters in X are: 'abdd', 'abd', 'bdd', 'bd'. 
Out of these, the smallest substring in S which contains all the characters present in X is 'bd'. 
All the other substring have a length larger than 'bd'.
Try solving now
02
Round
Easy
Video Call
Duration90 Minutes
Interview date6 Oct 2020
Coding problem2

This was a technical interview. The interviewer was very helpful and he gave me hints for a solution. He asked me 2 coding questions. Some others questions were:
Explain deadlock
Explain what is Hashmap and linked list. Why we use them? And where do we use them?
Why we prefer linked list over array?
What are the time complexity of various operations in both data Hashmap and linked list?
What do I like about GS more and why do I want to be the part of GS.

1. Excel Column Number

Easy
23m average time
0/40
Asked in companies
ZomatoExpedia GroupOracle

You have been given a column title as appears in an Excel sheet, return its corresponding column number.

For example:
A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28 
...
Try solving now

2. Excel Sheet | Part-2

Easy
15m average time
85% success
0/40
Asked in companies
IBMGoldman SachsLowe's

You are given a string STR representing the column title in an Excel Sheet. You need to find its corresponding column number.

For example: A corresponds to 1, B to 2, C to 3, … , Z to 26, AA to 27, .. and so on.

Try solving now
03
Round
Medium
Video Call
Duration60 Minutes
Interview date7 Oct 2020
Coding problem1

One coding question medium level.
The second was a puzzle. I wasn’t familiar with this puzzle at that time. So interviewer saw all my thinking processes.
puzzle was: 
We have two water jugs, one measures 4 Gallons (4G) while the other measure 9 Gallons (9G). But there is no measuring label mentioned on either of these two jugs i.e. we cannot know the exact amount filled in the jug. Now, assuming there is an infinite amount of water supply, can we measure all 1G, 2G, 3G…….. upto 9G using these unmarked jugs.
Hint: We can empty the jugs, and transfer water from one jug to other.
Then the interviewer asked about my project like what is the concept of the project, technologies used, etc.

1. Merge overlapping intervals

Easy
10m average time
90% success
0/40
Asked in companies
GoogleGrowwGoldman Sachs

Given 'N' number of intervals, where each interval contains two integers denoting the boundaries of the interval. The task is to merge all the overlapping intervals and return the list of merged intervals sorted in ascending order.

Two intervals will be considered to be overlapping if the starting integer of one interval is less than or equal to the finishing integer of another interval, and greater than or equal to the starting integer of that interval.

Example:
for the given 5 intervals - [1,4], [3,5], [6,8], [10,12], [8,9].
Since intervals [1,4] and [3,5] overlap with each other, we will merge them into a single interval as [1,5].

Similarly [6,8] and [8,9] overlaps, we merge them into [6,9].

Interval [10,12] does not overlap with any interval.

Final List after merging overlapping intervals: [1,5], [6,9], [10,12]
Try solving now
04
Round
Easy
HR Round
Duration60 Minutes
Interview date10 Oct 2020
Coding problem0

The latest version of C++
What is the difference between C++ and C++17?
Name some new features that are introduced in C++17
What are cloud computing and cloud credits?
Benefits of using cloud computing
Why you want to be a part of GS
Give some project idea that can be used in COVID-19

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you write a single-line comment in C++?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Goldman Sachs
2042 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 11 problems
Interviewed by Goldman Sachs
5427 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Goldman Sachs
692 views
1 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Goldman Sachs
520 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
13360 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
12384 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
8919 views
2 comments
0 upvotes