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

Software Engineer

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

Interview preparation journey

expand-icon
Journey
I was very new to coding when I joined the college, but the seniors of our college helped me a lot to learn it. I was fortunate to get some good offers but had a fair deal of rejections; my parents helped me a lot during that time.
Application story
I just applied randomly on the company portal as I was applying to many companies, got the test link, cleared aptitude, and moved to the interview.
Why selected/rejected for the role?
I got rejected. Maybe they found a better candidate, but my interview went well, and I thought I would proceed to the next round.
Preparation
Duration: 5 months
Topics: OOPS, System Design, Algorithms, Data Structures, DBMS
Tip
Tip

Tip 1: Prepare System Design
Tip 2: Practice DSA Questions properly
Tip 3: Practice OOPS and DBMS Concepts

Application process
Where: Company Website
Eligibility: No Criteria
Resume Tip
Resume tip

ip 1: Include at least 4 projects on your resume.

Tip 2: Do not write false information. You will always get caught. Be genuine.

 

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date3 Feb 2022
Coding problem2

First, there was a brief introduction. Then, moving on to DSA, using HackerRank CodePair as the live coding platform, he asked me to code the solution for ‘Convert a Binary Tree into its Mirror Tree’. I had to write the entire code, including the main function, and then solve one linked list question.

 

1. Convert binary tree to mirror tree

Easy
15m average time
85% success
0/40
Asked in companies
AdobeWalmartThales

Given a binary tree, convert this binary tree into its mirror tree.

A binary tree is a tree in which each parent node has at most two children.

Mirror of a Tree: Mirror of a Binary Tree T is another Binary Tree M(T) with left and right children of all non-leaf nodes interchanged.

alt text

Note:
1. Make in-place changes, that is, modify the nodes given a binary tree to get the required mirror tree.
Problem approach

Follow the steps below to solve the problem:

Call Mirror for left-subtree i.e., Mirror(left-subtree)
Call Mirror for right-subtree i.e., Mirror(right-subtree)
Swap left and right subtrees.
temp = left-subtree
left-subtree = right-subtree
right-subtree = temp

Try solving now

2. Reverse List In K Groups

Hard
15m average time
85% success
0/120
Asked in companies
SAP LabsSamsungIBM

You are given a linked list of 'n' nodes and an integer 'k', where 'k' is less than or equal to 'n'.


Your task is to reverse the order of each group of 'k' consecutive nodes, if 'n' is not divisible by 'k', then the last group of nodes should remain unchanged.


For example, if the linked list is 1->2->3->4->5, and 'k' is 3, we have to reverse the first three elements, and leave the last two elements unchanged. Thus, the final linked list being 3->2->1->4->5.


Implement a function that performs this reversal, and returns the head of the modified linked list.


Example:
Input: 'list' = [1, 2, 3, 4], 'k' = 2

Output: 2 1 4 3

Explanation:
We have to reverse the given list 'k' at a time, which is 2 in this case. So we reverse the first 2 elements then the next 2 elements, giving us 2->1->4->3.


Note:
All the node values will be distinct.


Problem approach

We have used a stack that will store the nodes of the given linked list. Firstly, push the k elements of the linked list in the stack. Now pop elements one by one and keep track of the previously popped node. Point the next pointer of the previous node to the top element of the stack. Repeat this process, until NULL is reached.
This algorithm uses O(k) extra space.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date25 Feb 2022
Coding problem2

After an introduction, we discussed my projects for about 10-15 minutes. I was asked to explain in detail one of my projects. Then, he asked me to write the code for finding the first occurrence of a substring in another circular string. After that, I had to write the code for the number of counts of target values in a sorted array. I first discussed the brute-force approaches with him and then moved to optimized approaches.

He was satisfied with it, and the round ended with me asking him the questions I had.
 

1. Frequency In A Sorted Array

Easy
15m average time
85% success
0/40
Asked in companies
SprinklrOlaUrban Company (UrbanClap)

You are given a sorted array 'ARR' and a number 'X'. Your task is to count the number of occurrences of 'X' in 'ARR'.

Note :
1. If 'X' is not found in the array, return 0.
2. The given array is sorted in non-decreasing order.
Problem approach

1) Use Binary search to get an index of the first occurrence of x in arr[]. Let the index of the first occurrence be i. 
2) Use Binary search to get the index of the last occurrence of x in arr[]. Let the index of the last occurrence be j. 
3) Return (j – i + 1);

Try solving now

2. Check Permutation

Easy
15m average time
85% success
0/40
Asked in companies
AmazonGoldman SachsCIS - Cyber Infrastructure

You have been given two strings 'STR1' and 'STR2'. You have to check whether the two strings are anagram to each other or not.

Note:
Two strings are said to be anagram if they contain the same characters, irrespective of the order of the characters.
Example :
If 'STR1' = “listen” and 'STR2' = “silent” then the output will be 1.

Both the strings contain the same set of characters.
Try solving now

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 remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
Software Engineer
4 rounds | 4 problems
Interviewed by Goldman Sachs
1382 views
0 comments
0 upvotes
company logo
Software Engineer
1 rounds | 3 problems
Interviewed by Goldman Sachs
978 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by Goldman Sachs
1374 views
0 comments
0 upvotes
company logo
Python Developer
3 rounds | 9 problems
Interviewed by Goldman Sachs
700 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7977 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
10148 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4448 views
1 comments
0 upvotes