Upload Button Icon Add office photos

Filter interviews by

Goldman Sachs Software Engineer Interview Questions and Answers

Updated 2 Apr 2025

9 Interview questions

A Software Engineer was asked
Q. Design and implement an LRU (Least Recently Used) cache.
Ans. 

Implement LRU cache

  • LRU stands for Least Recently Used

  • It is a cache eviction policy that removes the least recently used item

  • It can be implemented using a doubly linked list and a hash map

  • Newly accessed items are moved to the front of the list

  • When the cache is full, the item at the end of the list is removed

A Software Engineer was asked
Q. Given an array, find the maximum length of a subarray where the maximum of the subarray is less than or equal to twice the minimum of the subarray.
Ans. 

Find maximum length of subarray where max <= 2*min.

  • Iterate through array and keep track of max and min values.

  • Update max length when condition is met.

  • Time complexity: O(n)

Software Engineer Interview Questions Asked at Other Companies

asked in Qualcomm
Q1. Four people need to cross a bridge at night with only one torch t ... read more
asked in Capgemini
Q2. In a dark room, there is a box of 18 white and 5 black gloves. Yo ... read more
Q3. Tell me something about yourself. Define encapsulation. What is i ... read more
asked in Paytm
Q4. Puzzle : 100 people are standing in a circle .each one is allowed ... read more
asked in TCS
Q5. Find the Duplicate Number Problem Statement Given an integer arra ... read more
A Software Engineer was asked
Q. What is virtual memory? Will we need virtual memory even if we have infinite amount of RAM?
Ans. 

Virtual memory is a memory management technique that allows a computer to use more memory than it physically has.

  • Virtual memory uses a combination of RAM and hard disk space to store data.

  • It allows programs to use more memory than is physically available.

  • If a program tries to access memory that is not currently in RAM, it will be swapped in from the hard disk.

  • Even if we had infinite RAM, virtual memory would still...

A Software Engineer was asked
Q. 

Maximum of All Subarrays of Size K

Given an array of non-negative integers and an integer K representing the length of a subarray, your task is to determine the maximum elements for each subarray of size K...

Ans. 

Find the maximum elements for each subarray of size K in a given array.

  • Iterate through the array and maintain a deque to store the indices of elements in decreasing order.

  • Pop elements from the deque that are out of the current window.

  • Keep track of the maximum element in each subarray of size K.

  • Return the maximum elements for each subarray.

What people are saying about Goldman Sachs

View All
timepasstiwari
1d
A Digital Markter
Rishi Sunak Joins Goldman Sachs Again After 21 Years!
Remember Rishi Sunak? Yep the former UK Prime Minister. He’s now making headlines again, but this time not in politics. He’s joining Goldman Sachs as a senior advisor the same company he once worked at 21 years ago! What will he do now? Basically, he’ll be helping clients understand big-picture stuff like geopolitical risks, global economy trends, and will also be interacting with people and leaders around the world. It’s like he's going back to his finance roots but with a lot more experience this time. From running a whole country to advising one of the world’s biggest banks. not a small switch What do you think? Should more politicians go back to the private sector? Or is this just another power circle move?
FeedCard Image
Got a question about Goldman Sachs?
Ask anonymously on communities.
A Software Engineer was asked
Q. What is virtual memory?
Ans. 

Virtual memory is a memory management technique that allows a computer to compensate for physical memory shortages by temporarily transferring data from RAM to disk storage.

  • Virtual memory allows programs to use more memory than is physically available on the system.

  • It helps in multitasking by allowing multiple programs to run simultaneously without running out of memory.

  • Virtual memory uses a combination of RAM and...

A Software Engineer was asked
Q. 

LRU Cache Design Problem Statement

Design and implement a data structure for a Least Recently Used (LRU) cache that supports the following operations:

  • get(key) - Retrieve the value associated with the ...
Ans. 

Design and implement a Least Recently Used (LRU) cache data structure that supports get and put operations with a specified capacity.

  • Implement a doubly linked list to keep track of the order of keys based on their usage.

  • Use a hashmap to store key-value pairs for quick access and updates.

  • When a key is accessed or updated, move it to the front of the linked list to mark it as the most recently used.

  • When the cache re...

A Software Engineer was asked
Q. 

Serialization and Deserialization of an N-ary Tree

Given an N-ary tree where each node has at most 'N' child nodes, the task is to serialize the tree into a sequence of bits and then deserialize it back to...

Ans. 

Serialization and deserialization of an N-ary tree involves converting the tree into a sequence of bits and reconstructing the original tree from this format.

  • Serialize the N-ary tree by traversing it in level order and representing each node and its children using a space-separated sequence of integers.

  • Deserialize the serialized tree by parsing the input sequence and reconstructing the tree structure based on the ...

Are these interview questions helpful?
A Software Engineer was asked
Q. 

Simplify Directory Path Problem Statement

You are provided with a directory path in Unix-style notation, and your task is to simplify it according to given rules.

In a Unix-style file system:

  • A dot (....
Ans. 

Given a Unix-style directory path, simplify it by following certain rules and return the simplified path.

  • Use a stack to keep track of directories while iterating through the input path.

  • Handle cases for '.', '..', and multiple slashes appropriately.

  • Return the simplified path by joining the directories in the stack with '/' separator.

A Software Engineer was asked
Q. 

Design a Constant Time Data Structure

Create a data structure that maintains mappings between keys and values, supporting the following operations in constant time:

1. INSERT(key, value): Add or update th...
Ans. 

Design a constant time data structure for key-value mappings with operations like INSERT, DELETE, SEARCH, GET, GET_SIZE, and IS_EMPTY.

  • Use a hash table to achieve constant time complexity for operations.

  • Implement INSERT, DELETE, SEARCH, GET, GET_SIZE, and IS_EMPTY functions.

  • Ensure key is a string and value is a positive integer.

  • Return appropriate results based on the operation type.

  • Handle edge cases like key not fo...

Goldman Sachs Software Engineer Interview Experiences

9 interviews found

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Selected Selected

I applied via Recruitment Consulltant and was interviewed in Apr 2024. There were 5 interview rounds.

Round 1 - Coding Test 

F2f virtual coding round

Round 2 - One-on-one 

(2 Questions)

  • Q1. DSA questions were asked
  • Q2. Oops questions were asked
Round 3 - One-on-one 

(2 Questions)

  • Q1. Java questions were asked
  • Q2. Sql questions were asked
Round 4 - One-on-one 

(2 Questions)

  • Q1. System design questions were asked
  • Q2. LLM questions was asked
Round 5 - HR 

(2 Questions)

  • Q1. Behavioural questions were asked
  • Q2. Managerial questions were asked

Interview Preparation Tips

Topics to prepare for Goldman Sachs Software Engineer interview:
  • DSA
  • OOPS
  • Java
  • SQL
Interview experience
3
Average
Difficulty level
-
Process Duration
-
Result
-
  • Q1. Walk me through your resume
  • Q2. How do we make money?
  • Ans. 

    Companies generate revenue through various models like sales, subscriptions, advertising, and partnerships.

    • Sales of products or services (e.g., retail stores selling goods).

    • Subscription models (e.g., Netflix charging monthly fees for streaming).

    • Advertising revenue (e.g., Google earning from ads displayed on search results).

    • Partnerships and collaborations (e.g., co-branding initiatives).

    • Freemium models (e.g., offering b...

  • Answered by AI
Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

Aptitude , gk, basic eco

Round 2 - Technical 

(1 Question)

  • Q1. Sorting array, linked list data structure
Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

Data structure from stack to bst to graph dp,

Round 2 - Coding Test 

Data structure based , stack to bst to graph dp

Round 3 - cv scan 

(1 Question)

  • Q1. Went through cv completely , cross questions on everything
Interview experience
3
Average
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I appeared for an interview before Jan 2023.

Round 1 - Technical 

(1 Question)

  • Q1. Trapping rainwater problem
Round 2 - Technical 

(2 Questions)

  • Q1. Serach in sorted n*n matrix
  • Q2. Maximum product subarray
Round 3 - Technical 

(2 Questions)

  • Q1. Iterative binary tree traversal
  • Q2. Create BST from incoming stream of nodes
  • Ans. 

    Create a Binary Search Tree (BST) from an incoming stream of nodes.

    • Start with an empty BST

    • For each incoming node, compare it with the root node and insert it accordingly

    • Repeat the process until all nodes are inserted

  • Answered by AI

Skills evaluated in this interview

I appeared for an interview before Sep 2020.

Round 1 - Video Call 

(1 Question)

Round duration - 40 minutes
Round difficulty - Easy

Timing: 12PM
Due to covid, the interviews happened over a video call on Zoom. They also shared an IDE link where we could write our code and the interview could see it.
The interviewer was very polite and helpful. She dropped hints in between to help me reach the final solution when I was stuck or needed some clarity. She wanted to check how analytically I could solve the problem. She focused more on my approaches towards the problem.
There was also a brief discussion on my resume and projects.

  • Q1. 

    Serialization and Deserialization of an N-ary Tree

    Given an N-ary tree where each node has at most 'N' child nodes, the task is to serialize the tree into a sequence of bits and then deserialize it back t...

  • Ans. 

    Serialization and deserialization of an N-ary tree involves converting the tree into a sequence of bits and reconstructing the original tree from this format.

    • Serialize the N-ary tree by traversing it in level order and representing each node and its children using a space-separated sequence of integers.

    • Deserialize the serialized tree by parsing the input sequence and reconstructing the tree structure based on the provi...

  • Answered by AI
Round 2 - Video Call 

(1 Question)

Round duration - 40 minutes
Round difficulty - Medium

Timing: Mid-afternoon
Due to covid, the interviews happened over a video call on Zoom. They also shared an IDE link where we could write our code and the interview could see it.
The interviewer was very polite and helpful. He dropped hints in between to help me reach the final solution when I was stuck or needed some clarity. He wanted to check how analytically I could solve the problem. He focused more on my approaches towards the problem.
There was also a brief discussion on my resume and projects.

  • Q1. 

    Design a Constant Time Data Structure

    Create a data structure that maintains mappings between keys and values, supporting the following operations in constant time:

    1. INSERT(key, value): Add or update t...
  • Ans. 

    Design a constant time data structure for key-value mappings with operations like INSERT, DELETE, SEARCH, GET, GET_SIZE, and IS_EMPTY.

    • Use a hash table to achieve constant time complexity for operations.

    • Implement INSERT, DELETE, SEARCH, GET, GET_SIZE, and IS_EMPTY functions.

    • Ensure key is a string and value is a positive integer.

    • Return appropriate results based on the operation type.

    • Handle edge cases like key not found o...

  • Answered by AI
Round 3 - Video Call 

(1 Question)

Round duration - 30 Minutes
Round difficulty - Medium

Timing: Evening
Due to covid, the interviews happened over a video call on Zoom. They also shared an IDE link where we could write our code and the interview could see it.
There was a panel of three people as interviewers in this round.
I was also asked one behaviour questions in this round.

  • Q1. 

    Simplify Directory Path Problem Statement

    You are provided with a directory path in Unix-style notation, and your task is to simplify it according to given rules.

    In a Unix-style file system:

    • A dot (...
  • Ans. 

    Given a Unix-style directory path, simplify it by following certain rules and return the simplified path.

    • Use a stack to keep track of directories while iterating through the input path.

    • Handle cases for '.', '..', and multiple slashes appropriately.

    • Return the simplified path by joining the directories in the stack with '/' separator.

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI completed Software Engineering from Delhi Technological University. Eligibility criteriaNo criteria.Goldman Sachs interview preparation:Topics to prepare for the interview - Data Structures, Database Management System, Object-Oriented Programming System Algorithms, Dynamic Programming, Graph, Puzzles, Operating System, Multi-Threading, projects.Time required to prepare for the interview - 10 monthsInterview preparation tips for other job seekers

Tip 1 : Focus on Data Structures and Algorithms. Practising questions based on them every day is the key to succeeding. You can enroll into a Data Structures and Algorithms course by Coding Ninjas. This course helped me build a strong foundation in these topics. I also recommend platforms like LeetCode and InterviewBit for further practice.
Tip 2 : During your interview THINK OUT LOUD!!! It is very important that you voice your approach towards the problem otherwise interviewer will have no clue what you are thinking. 
Tip 3 : Do give mock interviews to some college senior or mentor. They help you understand how to express your thought process better (Think out loud) and also reduce the interview stress and anxiety.

Application resume tips for other job seekers

Tip 1 : In order to make a strong resume you must include at least 2-3 Projects and an intern/work experience. Mention all your skills which you are confident of in your resume. 
Tip 2 : Try to make it of one page only. You can use overleaf to make your resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

I applied via LinkedIn and was interviewed in Mar 2021. There were 4 interview rounds.

Interview Questionnaire 

1 Question

  • Q1. All were Ds and algo questions?

Interview Preparation Tips

Interview preparation tips for other job seekers - Be prepared on DS and algo section. Also keep practising on online competitive coding.

I appeared for an interview before Mar 2021.

Round 1 - Face to Face 

(3 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Technical round with questions on DSA and OS.

  • Q1. 

    LRU Cache Design Problem Statement

    Design and implement a data structure for a Least Recently Used (LRU) cache that supports the following operations:

    • get(key) - Retrieve the value associated with the...
  • Ans. 

    Design and implement a Least Recently Used (LRU) cache data structure that supports get and put operations with a specified capacity.

    • Implement a doubly linked list to keep track of the order of keys based on their usage.

    • Use a hashmap to store key-value pairs for quick access and updates.

    • When a key is accessed or updated, move it to the front of the linked list to mark it as the most recently used.

    • When the cache reaches...

  • Answered by AI
  • Q2. 

    Maximum of All Subarrays of Size K

    Given an array of non-negative integers and an integer K representing the length of a subarray, your task is to determine the maximum elements for each subarray of size ...

  • Ans. 

    Find the maximum elements for each subarray of size K in a given array.

    • Iterate through the array and maintain a deque to store the indices of elements in decreasing order.

    • Pop elements from the deque that are out of the current window.

    • Keep track of the maximum element in each subarray of size K.

    • Return the maximum elements for each subarray.

  • Answered by AI
  • Q3. What is virtual memory?
  • Ans. 

    Virtual memory is a memory management technique that allows a computer to compensate for physical memory shortages by temporarily transferring data from RAM to disk storage.

    • Virtual memory allows programs to use more memory than is physically available on the system.

    • It helps in multitasking by allowing multiple programs to run simultaneously without running out of memory.

    • Virtual memory uses a combination of RAM and disk...

  • Answered by AI

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAGoldman Sachs interview preparation:Topics to prepare for the interview - Coding Skills, Operating Systems , Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 5 monthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewRejected

Skills evaluated in this interview

Software Engineer Interview Questions & Answers

user image Sachin Aglave

posted on 14 Jan 2015

Interview Questionnaire 

4 Questions

  • Q1. Tell me about your internship, B.Tech project(BTP), CV
  • Q2. Implement LRU cache.
  • Ans. 

    Implement LRU cache

    • LRU stands for Least Recently Used

    • It is a cache eviction policy that removes the least recently used item

    • It can be implemented using a doubly linked list and a hash map

    • Newly accessed items are moved to the front of the list

    • When the cache is full, the item at the end of the list is removed

  • Answered by AI
  • Q3. What is virtual memory? Will we need virtual memory even if we have infinite amount of RAM?
  • Ans. 

    Virtual memory is a memory management technique that allows a computer to use more memory than it physically has.

    • Virtual memory uses a combination of RAM and hard disk space to store data.

    • It allows programs to use more memory than is physically available.

    • If a program tries to access memory that is not currently in RAM, it will be swapped in from the hard disk.

    • Even if we had infinite RAM, virtual memory would still be n...

  • Answered by AI
  • Q4. Given an array, Find out maximum length of subarray where max of subarray <= 2*min of subarray
  • Ans. 

    Find maximum length of subarray where max <= 2*min.

    • Iterate through array and keep track of max and min values.

    • Update max length when condition is met.

    • Time complexity: O(n)

  • Answered by AI

Interview Preparation Tips

Round: Resume Shortlist
Experience: No CPI cut off and It was open for all departments.

Round: Test
Experience: In muliple choice question Mostly questions were base on maths, probability, c programs, algorithms, Systems. If you are prepared then Questions were not that much tough. Keep strong concepts of Operating systems. For subjective part, Some problems were from maths proofs, some were from probability, some were from algo. We had to write algorithms. etc
Duration: 180 minutes

Round: Problem Statement
Experience: Questions were doable.

Round: Interview
Experience: Everyone was cool, They made me feel comfortable and then started asking questions.
Tips: If you have good rank in online coding competition, do mention it in CV.Most of the students think that GS asks only probability-puzzles. They did not asked me any question on probability or puzzle. Everything they asked was based on Algorithms problems and Operating system. I think it depends on team for which they are hiring. Most important point is don’t lose hope because you have low CPI or you are not good at something. Keep Operating systems fundamental concepts strong.

General Tips: We should balance in Placement and Compititive online coding. Keep in mind Placements and Compititive online coding are some what different things. Keep on improving our mistakes on daily basis. I would strongly suggest you to do introspection daily it will help you to find out your weaknesses and strong points, where we are going wrong etc. There are two thing on which we shoud focus.1. Preparation (I have told everything requered for preparation).2. Get output of all hard work. How to keep our mind on 100% output while the actual exam(placement).For this, I used to go for physical exercise daily in the morning and medidate for 20-30 minutes. Along with exercise i used to do Sudarshan Kriya(Art of Living). Meditation has lot of power :).
Skill Tips: Keep your OS fundamentals strong. To improve codgin skills practice as many problems as you can. Regularly participate in online coding competitions it really helps to solve or approach any new problem. Many time instead of correct answer the approach to solve the problems is very important. How you think, How you approach the problem is checked in interview.
Skills: Coding Skills, Operating Systems , Problem solving skills
College Name: IIT Guwahati
Motivation: The name GS itself enogh for motivation.

Skills evaluated in this interview

Interview questions from similar companies

I applied via Campus Placement and was interviewed in Dec 2016. There were 5 interview rounds.

Interview Questionnaire 

4 Questions

  • Q1. Questions about projects
  • Q2. Why Paypal?
  • Ans. 

    Paypal is a leading online payment platform with a strong reputation and global presence.

    • Paypal is a well-established and trusted online payment platform used by millions of users worldwide.

    • It offers secure and convenient payment options for both individuals and businesses.

    • Paypal has a strong focus on innovation and technology, making it an exciting place to work for software engineers.

    • Working at Paypal provides opport...

  • Answered by AI
  • Q3. What does Paypal do?
  • Ans. 

    Paypal is a digital payment platform that allows individuals and businesses to make online transactions.

    • Paypal provides a secure way to send and receive money online.

    • It allows users to link their bank accounts, credit cards, or debit cards to their Paypal account.

    • Users can make payments to merchants or individuals using their Paypal balance or linked payment methods.

    • Paypal offers buyer and seller protection, dispute re...

  • Answered by AI
  • Q4. How do you see yourself in 5 years?
  • Ans. 

    In 5 years, I see myself as a senior software engineer leading a team of developers on innovative projects.

    • Continuing to enhance my technical skills and knowledge through ongoing learning and certifications

    • Taking on more leadership responsibilities and mentoring junior team members

    • Contributing to the development of cutting-edge software solutions

    • Building strong relationships with colleagues and stakeholders to drive pr...

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: One Programming and 15 multiple choice Questions.
Duration: 1 hour 30 minutes
Total Questions: 16

Round: Technical Interview
Experience: All details about projects you have written on resume. Some different implementation of some parts of your project.

Skills: Knowledge about Database Managements Systems, Problem Solving Skills
College Name: IIT Madras

Goldman Sachs Interview FAQs

How many rounds are there in Goldman Sachs Software Engineer interview?
Goldman Sachs interview process usually has 3-4 rounds. The most common rounds in the Goldman Sachs interview process are Technical, Coding Test and One-on-one Round.
How to prepare for Goldman Sachs Software Engineer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Goldman Sachs. The most common topics and skills that interviewers at Goldman Sachs expect are HTML, Investment Banking, Python, Risk Management and SDLC.
What are the top questions asked in Goldman Sachs Software Engineer interview?

Some of the top questions asked at the Goldman Sachs Software Engineer interview -

  1. what is virtual memory? Will we need virtual memory even if we have infinite am...read more
  2. Given an array, Find out maximum length of subarray where max of subarray <= 2*...read more
  3. Create BST from incoming stream of no...read more

Tell us how to improve this page.

Overall Interview Experience Rating

4/5

based on 6 interview experiences

Difficulty level

Moderate 67%
Hard 33%

Duration

Less than 2 weeks 67%
2-4 weeks 33%
View more
Goldman Sachs Software Engineer Salary
based on 322 salaries
₹22 L/yr - ₹36 L/yr
213% more than the average Software Engineer Salary in India
View more details

Goldman Sachs Software Engineer Reviews and Ratings

based on 16 reviews

3.6/5

Rating in categories

3.0

Skill development

3.9

Work-life balance

3.4

Salary

3.6

Job security

4.1

Company culture

2.8

Promotions

3.2

Work satisfaction

Explore 16 Reviews and Ratings
Compliance - Associate - Software Engineering

Bangalore / Bengaluru

2-5 Yrs

₹ 11-32 LPA

Risk-Associate-Software Engineering

Bangalore / Bengaluru

3-8 Yrs

Not Disclosed

Risk-Associate-Software Engineering

Bangalore / Bengaluru

2-3 Yrs

₹ 12-40 LPA

Explore more jobs
Associate
2.5k salaries
unlock blur

₹19 L/yr - ₹35 L/yr

Analyst
2k salaries
unlock blur

₹11.4 L/yr - ₹21.3 L/yr

Vice President
1.9k salaries
unlock blur

₹35.9 L/yr - ₹60 L/yr

Senior Analyst
1.3k salaries
unlock blur

₹9.2 L/yr - ₹15.2 L/yr

Senior Associate
431 salaries
unlock blur

₹14.9 L/yr - ₹27 L/yr

Explore more salaries
Compare Goldman Sachs with

JPMorgan Chase & Co.

3.9
Compare

Morgan Stanley

3.6
Compare

TCS

3.6
Compare

Amazon

4.0
Compare
write
Share an Interview