Goldman Sachs Interview Questions for Freshers

Goldman Sachs Interview Questions for Freshers 2022

Find the Goldman Sachs Interview Questions for freshers asked in 2022.

Page Highlights:-

Goldman Sachs Interview Questions

Goldman Sachs Technical Interview Questions for Non-IT Candidates

Question 1:- Define structure and class in C++.

Answer:

Structure: By default, members of the structure are public. The default access specifiers for the base class/struct are public when constructing a struct from it.

Class: By default, members of the class are private. When deriving a class, the default access specifiers are hidden.

Read more about C++ 

Question 2:- Write a program to check whether a number Automorphic number or not.

Question 3:- What is runtime polymorphism in Java?

Answer:

Runtime Polymorphism:

In runtime polymorphism, a call to an overridden method is resolved at runtime rather than at compile time. The Dynamic Method Dispatch approach is another name for runtime polymorphism.

In this function, the reference variable of a superclass is used to call an overridden method.

The object-directed to the reference variable is used to determine which method should be performed.

Read more about Java 

Question 4:- Write a program to check whether a number Harshad number or not.

Question 5:- What is a Red-Black Tree in context to data structures?

Answer:

A red-black tree is a self-balancing binary search tree with one additional bit at each node that is generally read as the colour (red or black). As insertions and deletions are made, these colours are utilized to keep the tree balanced. The balance of the tree isn’t ideal, but it’s good enough to reduce searching time and maintain it around O(log n), where n is the total number of nodes in the tree. This tree was created in 1972 by Rudolf Bayer.

Points to remember:

  • A red-black tree has a node color that is either red or black.
  • The root of the tree is always black.
  • There are no red nodes adjacent to one another (A red node is not allowed to have a red parent or red child).
  • Every path from a node (including the root) to any of its descendant’s NULL nodes has the same amount of black nodes.

Question 6:- Explain the working of AJAX.

Answer:-

Ajax (Asynchronous JavaScript and XML) is a collection of web development methodologies for creating asynchronous web applications using various client-side web technologies. Ajax-enabled web applications can send and receive data from a server asynchronously (in the background) without interfering with the appearance and behaviour of the existing page.

Ajax communicates with the server using the XMLHttpRequest Object. A request is submitted by the user via the User Interface, and a JavaScript call is made to the XMLHttpRequest Object, which then sends an XMLHttp request to the XMLHttpRequest Object. The server then interacts with the database via php, servlet, ASP.net, and other technologies. The data is retrieved, and the server sends it in the form of XML or Jason data to the XMLHttpRequest Callback method. The data is subsequently displayed on the browser via HTML and CSS.

Question 7:- Explain processes and threads in context of OS.

Answer:

A process is a program that is running and acts as the foundation for all calculations. Although it is quite similar, the procedure is not the same as programming code. In contrast to the program, which is considered a ‘passive’ entity, a process is considered a ‘active’ entity. Among the attributes held by the process are hardware state, memory, and CPU.

Threads and processes share the same qualities, which is why they are referred to as lightweight processes. Threads are executed one after the other, creating the illusion that they are running concurrently. Each thread has a distinct state. Threads are interdependent because they share code, data, and OS resources.

Question 8:- What does shell sort mean?

Answer

Insertion sort has been generalized into shell sort. It is a sorting method that is highly efficient. The original list is broken down into multiple smaller sub-lists, sorted using an insertion sort.

Question 9:- Explain BFS (Breadth First Search) vs DFS (Depth First Search) in context of graph traversal.

Answer:

  • Breadth-First Search(BFS) is a vertex-based approach that starts at the root of the tree and visits all nodes at the current depth level before moving on to nodes at the next depth level. It makes use of a Queue data structure that adheres to the first-in, first-out concept. In BFS, one vertex is visited and marked at a time, followed by its neighbours, who are also visited and queued.
  • Depth First Search (DFS) is a technique based on the edges. It makes use of the Stack data structure and works in two stages: first, visited vertices are placed into the stack, and then, if no vertices are found, visited vertices are popped.

Question 10:- Write a program to check if the given two numbers are friendly pair or not

Question 11:-Can a constructor be private in C++?

Answer:

A function Object() is a member function of a class that is in charge of initialising the class’s objects. The function Object() is automatically invoked when a class object is created in C++. Constructors are normally defined in a class’s public section. So the question is if construction can be defined in the private section of the class. A function Object()  can be defined in the private section of the class.

Question 12:- List the different categories of joins.

Answer:

The different categories of joins are:

  • INNER JOIN: When both tables have a match, INNER JOIN returns rows.
  • LEFT JOIN: Even if the right table has no matches, the LEFT JOIN returns all rows from the left table.
  • RIGHT JOIN: Even if the left table contains no matches, the RIGHT JOIN returns all rows from the right table.
  • FULL OUTER JOIN: When one of the tables has a match, FULL OUTER JOIN returns rows.
  • SELF JOIN: A SELF JOIN links a table to itself as if it were two tables, temporarily renaming at least one of them.
  • CARTESIAN JOIN (CROSS JOIN): The CARTESIAN JOIN (CROSS JOIN) returns the Cartesian product of the sets of values in two or more connected tables.

Question 13:- What does an agile model imply?

Answer:

Agile model: The tasks in an agile project are broken down into smaller iterations or segments. The software product is broken down into incremental modules in agile, and each module must be completed before the project can be completed. Each iteration includes software strategy, design, development, testing, and maintenance.

Question 14:- What is a degree of Relation?

Answer:

A degree of relation, also known as Cardinality, is defined as the number of occurrences one entity occurs in relation to the number of times another entity occurs.

Question 15:- Write a program for finding the sum of all nodes in Binary tree.

Goldman Sachs HR Interview Questions

Question 1:- Tell me something which is not mentioned in your resume

Answer:-

I’m pleased with my capacity to adjust to changing conditions, which I don’t include on my résumé. I’d gone to a camp where there were few options for staying and eating. It was difficult because of the extreme cold and my lack of gear, but I went on a hunt, found some rocks, and created a fire for myself and my coworkers, and we made it through the night. That way, I’m confident in my ability to adapt to any situation.

Read more at: Tell me something which is not mentioned in your resume

Question 2:- Can you work night shifts?

Answer:-

Everything that is required for the company’s growth and success will also be required for my personal development. So, if rotational shifts/night shifts are required, I am entirely fine with it.

Read more at: Can you work night shifts?

Question 3:- What is the difference between hard work and smart work?

Answer:-

Smart work allows you to think differently than most people.

Hard work, on the other hand, requires more time and preparation, which is a common occurrence among many people.

Read more at: What is the difference between hard work and smart work?

Question 4:- What will you do if you are offered a job with a better package?

Answer:-

I really wouldn’t change jobs if my existing one offers me the best opportunities for advancement in the business. I’ll talk to my boss about the situation and ask about his thoughts on my professional development; if I find space for development in my current position, I’ll stay; else, I’ll look for another job simply for the sake of promotion.

Read more at: What will you do if you are offered a job with a better package?

Question 5:- Why do you want to join our company?

Answer:-

I’d want to use this time to express my gratitude for the excellent opportunity to be interviewed by such a reputable organization as yours. I recognize that I am a newcomer, but I have always wanted to be a member of your organization’s workforce since it appears to be a place where hard effort is rewarded and where the learning curve is steep. We’ve always looked to groups like yours to help me get my career started. I feel that working in the appropriate environment allows one to achieve far more than working in an unappreciative environment. One of the main reasons why your organization is at the top of my priority list is because of this. I guarantee you that I am fully committed to my work and will make a significant contribution to this company.

Read more at: Why do you want to join our company?