Goldman Sachs interview experience Real time questions & tips from candidates to crack your interview

New Analyst

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

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Graphs, Dynamic programming, Trees, Arrays, Strings, LinkedList, Puzzles, OOPs, OS, DBMS, SQL
Tip
Tip

Tip 1 : Be consistent, solve at-least 4-5 problems weekly
Tip 2 : Prepare all contents of resume properly
Tip 3 : Practice puzzles and probability questions along with DSA
Tip 4 : Cover every Scenario for Project

Application process
Where: Other
Eligibility: For 2021 Graduates
Resume Tip
Resume tip

Tip 1 : Mention Tech stack along with projects
Tip 2 : Dont include skills which you dont have experience with.

Interview rounds

01
Round
Hard
Online Coding Interview
Duration90 minutes
Interview date26 Feb 2021
Coding problem0

Timing : 2:00 PM
Environment was good on hackerrank
Too lengthy test and covered every aspect of aptitude
Negative marking was also there

02
Round
Hard
Online Coding Interview
Duration90 minutes
Interview date25 Mar 2021
Coding problem0

Timing : 7:30 PM
Environment was hackerrank
Too difficult paper along with each section timed

03
Round
Medium
Video Call
Duration60 minutes
Interview date23 Apr 2021
Coding problem2

Timing : 10:00 AM
Interview was conducted on Codepair
Interviewer was very good

1. Validate BST

Moderate
25m average time
0/80
Asked in companies
FacebookAmazonFreshworks

You have been given a binary tree of integers with N number of nodes. Your task is to check if that input tree is a BST (Binary Search Tree) or not.

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.
Example :

BST1

Answer :

Level 1: 

All the nodes in the left subtree of 4 (2, 1, 3) are smaller 
than 4, all the nodes in the right subtree of the 4 (5) are 
larger than 4.

Level 2 :

For node 2:
All the nodes in the left subtree of 2 (1) are smaller than 
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtrees for node 5 are empty.

Level 3:

For node 1:
The left and right subtrees for node 1 are empty.
For node 3:
The left and right subtrees for node 3 are empty.

Because all the nodes follow the property of a binary search tree, the above tree is a binary search tree.
Try solving now

2. Ninja And Typing

Easy
15m average time
85% success
0/40
Asked in companies
Deutsche BankGoldman SachsVMware Inc

Ninja wants to print two strings in a text editor but his keyword allows typing lowercase English letters and backspace only.

Ninja type ‘N’ characters given by string ‘STR1’ to print the first string in the editor, and type ‘M’ characters given by string ‘STR2’ to print the second string. Both ‘STR1’ and ‘STR2’ have lowercase English characters and ‘#’ to denote backspace.

Your task is to return true if both strings that print on the text editor are equal otherwise return false. See the example for more clarity.

Note:
Backspace has no effect on empty text.
Example:
Consider ‘STR1’ = “ade##c#ba”, ‘STR2 = ‘a#ad#b#ba

Both ‘STR1’ and ‘STR2’ print the string “aba” on the text editor, thus we should return true.
Try solving now
04
Round
Easy
Face to Face
Duration45 minutes
Interview date23 Apr 2021
Coding problem2

Timing : 1:00 PM
Interview was conducted on Codepair hackerrank

1. Trapping Rain Water

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

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Try solving now

2. Merge Intervals

Moderate
20m average time
80% success
0/80
Asked in companies
InnovaccerFacebookSalesforce

You are given N number of intervals, where each interval contains two integers denoting the start time and the end time for the interval.

The task is to merge all the overlapping intervals and return the list of merged intervals sorted by increasing order of their start time.

Two intervals [A,B] and [C,D] are said to be overlapping with each other if there is at least one integer that is covered by both of them.

For 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] overlap, 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
05
Round
Easy
Face to Face
Duration30 minutess
Interview date23 Apr 2021
Coding problem2

Timing : 5:00 PM
Interview was conducted on codepair

1. Cycle Detection in a Singly Linked List

Moderate
15m average time
80% success
0/80
Asked in companies
ProtiumSterlite Technologies LimitedOYO

You are given a Singly Linked List of integers. Return true if it has a cycle, else return false.


A cycle occurs when a node's next points back to a previous node in the list.


Example:
In the given linked list, there is a cycle, hence we return true.

Sample Example 1

Try solving now

2. Technical Questions

What is virtual Memory ?
what are ACID properties ?
Difference between Overriding and Overloading ?

Here's your problem of the day

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

Skill covered: Programming

Which operator is used for exponentiation in Python?

Choose another skill to practice
Similar interview experiences
company logo
Software Engineer Intern
2 rounds | 3 problems
Interviewed by Goldman Sachs
908 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by Goldman Sachs
931 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Goldman Sachs
582 views
0 comments
0 upvotes
company logo
Python Developer
3 rounds | 9 problems
Interviewed by Goldman Sachs
418 views
0 comments
0 upvotes