Filter interviews by
I was interviewed in Oct 2020.
Round duration - 135 minutes
Round difficulty - Hard
(Online Assessment Test): Platform was HackerRank with tab proctoring and webcam proctoring enabled. This round consisted of 5 sections(There was a section-wise time limit)
Section 1:
=> 2 coding questions of moderate level (Time: 30 Minutes)
=> 5 languages allowed: CPP, java, java8, python, python3
Section 2: (Maths and Quant):
=> Marking: +5,-2
=> Time: 25 min
=> 8 MCQs
=> Questions on probability, combinatorics, binomial theorem, etc.
Section 3: (CS MCQs):
=> Marking:+5,-2
=> Time: 20 min
=> 7 MCQs
=> Based on topics like Data structures, Algorithms, OS, Networking, etc.
Section 4:
=> The Advanced Programming Section had 1 programming question.
=>Time: 45 mins.
Section 5:
=> 2 value-based type questions each having 10 marks(to be answered in brief)
=> Time: 15 min
The questions of section 5 were as follows:
1. Suppose you and your friend are doing an important project having some deadline. Then suddenly your friend left the project in the middle because of some unavoidable reasons. What will you do in that situation?
2. Mention one instance where you were highly motivated and excited for a project and you achieved exceptional results in it.
Shortlist Criteria, GS follow GPA+TEST Score. 54 students were shortlisted for the next Rounds.
You are given an array/list HEIGHTS
of length N
, where each element represents the height of a histogram bar. The width of each bar is considered to be 1.
Compute the area of the largest rectangle that can be formed within the bounds of a given histogram.
Iterate through the histogram bars and maintain a stack to keep track of increasing heights.
Calculate the area of the rectangle for each bar by considering it as the smallest height in the rectangle.
Update the maximum area found so far as you iterate through the histogram.
Time complexity can be optimized to O(N) using a
Given a specified number of intervals, where each interval is represented by two integers denoting its boundaries, the task is to merge all overlapping interv...
Merge overlapping intervals and return sorted list of merged intervals.
Identify overlapping intervals based on start and end times
Merge overlapping intervals to form new intervals
Sort the merged intervals in ascending order of start times
You are provided with a string STR
of length N
. The goal is to identify the longest palindromic substring within this string. In cases where multiple palind...
Given a string, find the longest palindromic substring, prioritizing the one with the smallest start index.
Iterate through the string and expand around each character to find palindromes.
Keep track of the longest palindrome found and its starting index.
Return the longest palindromic substring with the smallest start index.
Round duration - 60 minutes
Round difficulty - Medium
The platform was Zoom for video calls and HackerRank CodePair for coding.
This round began with a formal introduction, followed by a few questions related to the work I have done as Technical Head in the Placement Cell during Under Graduation. Then, he asked me how much I rate myself in problem-solving and coding skills and justify why I think so.
Then, he asked to write code for the problem:
Sort the array of strings according to the new alphabetical order. New alphabetical order starts with a given character ‘c’.
After that, he asked me If I had any questions to ask.
This round went very well, and I was selected for the next round.
Given an array of strings ARRSTR[]
of size N
, and a character C
, your task is to sort the ARRSTR[]
array according to a new alphabetical order that starts with the ...
Sort an array of strings based on a new alphabetical order starting with a given character.
Iterate through the array of strings and compare each string with the given character to determine the new order.
Use a custom comparator function to sort the strings based on the new alphabetical order.
Handle lowercase English alphabet characters and strings of varying lengths.
Round duration - 60 minutes
Round difficulty - Medium
The Interviewer had my CV this time. He started by asking me about the experience of the previous Interview round.
He then asked me to introduce myself and asked me to tell more about my strengths, language preferences, and technical skills.
Then for the next 20-25 minutes, he asked questions related to the project I mentioned. He particularly asked me to explain in detail the part of the project that my other teammate did. He also asked questions like what I learned from this, what was the motive behind this etc…
Since I mentioned in my introduction that I had an interest in the Data Science Field, he asked a few questions related to data mining, data pre-processing, machine learning algorithms, libraries used for the same, etc.
Tip 1 : Do not panic and Remain calm. Be Honest(in both Resume and during the Interview).
Tip 2 : Listen to the PPTs of the companies properly.
Tip 3 : While you are solving a question, speak to the interviewer.
Tip 4 : Data Structures, Problem Solving is very important. Good CGPA helps, personal projects, extracurricular activities would also give you an edge.
Tip 1 : Have some good projects on your resume and study those.
Tip 2 : Don't lie on your resume, as they are very much experienced.
I was interviewed in Oct 2020.
Round duration - 135 Minutes
Round difficulty - Medium
The platform was HackerRank with tab proctoring and webcam proctoring enabled.
Timings were during day time around 10 am
You are given an array/list HEIGHTS
of length N
, where each element represents the height of a histogram bar. The width of each bar is considered to be 1.
Compute the area of the largest rectangle that can be formed within the bounds of a given histogram.
Iterate through the histogram bars and maintain a stack to keep track of increasing heights.
Calculate the area of the rectangle by considering the current height as the height of the rectangle and the width as the difference between the current index and the index at the top of the stack.
Update the maximum area found so
Given a string ‘S’ composed of lowercase English letters, your task is to identify the longest palindromic substring within ‘S’.
If there are multiple longest palin...
Find the longest palindromic substring in a given string, returning the rightmost one if multiple substrings are of the same length.
Use dynamic programming to check for palindromes within the string.
Start by checking for palindromes of length 1 and 2, then expand to longer substrings.
Keep track of the longest palindromic substring found so far and return the rightmost one if multiple substrings are of the same length.
Round duration - 30 Minutes
Round difficulty - Medium
During day time
Platform: Zoom
The round starts with some introduction of mine, followed by my interests in life and what should I see in the company where I want to work
Given two strings S
and X
containing random characters, the task is to find the smallest substring in S
which contains all the characters present in X
.
The first...
Find the smallest substring in a given string that contains all characters from another string.
Use a sliding window approach to find the smallest window in S that contains all characters in X.
Keep track of the characters in X using a hashmap.
Move the right pointer to expand the window until all characters in X are found, then move the left pointer to shrink the window while maintaining the condition.
Return the smallest...
Tip 1 : Remain calm while preparing and while performing in interviews
Tip 2 : DSA should be on tips
Tip 3 : Be alert what is being asked to you and think with open mind
Tip 1 : Be concise and to the point
Tip 2 : Format should be standard and chronology order of mentioning things should be proper
I was interviewed in Oct 2020.
Round duration - 135 minutes
Round difficulty - Easy
-> 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.
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 then return the reordered l...
Rearrange nodes in a singly linked list by grouping odd and even indices together while maintaining relative order.
Create two separate linked lists for odd and even nodes
Traverse the original list and append nodes to respective odd/even lists
Connect the last node of odd list to the head of even list
Return the head of the rearranged list
You are given a binary search tree (BST) containing N nodes. Additionally, you have references to two nodes, P and Q, within this BST.
Your task is to determine the Lowest Com...
Find the Lowest Common Ancestor (LCA) of two nodes in a Binary Search Tree (BST).
Traverse the BST from the root node to find the LCA of nodes P and Q.
Compare the values of nodes P and Q with the current node's value to determine the LCA.
If both nodes are on the same side of the current node, move to that side; otherwise, the current node is the LCA.
Handle cases where one node is the ancestor of the other or when one of
Given two strings S
and X
containing random characters, the task is to find the smallest substring in S
which contains all the characters present in X
.
The first...
Find the smallest substring in a given string that contains all characters from another given string.
Use a sliding window approach to find the smallest window in S that contains all characters in X.
Keep track of the characters in X using a hashmap.
Slide the window to the right until all characters in X are found, then shrink the window from the left to find the smallest window.
Return the smallest window found.
Example: ...
Round duration - 90 Minutes
Round difficulty - Easy
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.
Given a column title as it appears in an Excel sheet, your task is to return its corresponding column number.
S = "AB"
28
The seq...
Convert Excel column title to corresponding column number.
Map each letter to its corresponding value (A=1, B=2, ..., Z=26)
Iterate through the input string from right to left, calculate the value of each letter based on its position and add it to the result
Multiply the result by 26 for each additional letter to the left
You are provided with a string STR
representing a column title in an Excel Sheet. Your task is to determine the corresponding column number.
A typica...
Given a string representing an Excel column title, determine the corresponding column number.
Iterate through the characters of the string from right to left
Calculate the corresponding value of each character based on its position and multiply by 26^position
Sum up all the values to get the final column number
Round duration - 60 Minutes
Round difficulty - Medium
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.
Given a specified number of intervals, where each interval is represented by two integers denoting its boundaries, the task is to merge all overlapping interv...
Merge overlapping intervals and return sorted list of merged intervals.
Identify overlapping intervals by comparing start and end times.
Merge overlapping intervals to form new intervals.
Sort the merged intervals in ascending order of start times.
Tip 1 : Practice at least 300 coding questions.
Tip 2 : Also focus on your aptitude quantitative.
Tip 3 : Do some good projects.
Tip 1 : Don't write anything on your resume which is not correct.
Tip 2 : Mention some good projects on your resume.
I was interviewed in Oct 2020.
Round duration - 65 minutes
Round difficulty - Hard
It was around 6 pm and was held on Hackerrank. Having switched on WebCam during the entire duration was mandatory. We were required to solve 2 questions under 65 mins. Solving one problem completely, along with some of the test cases of another, was enough for getting shortlisted.
You are provided with a sentence 'TEXT'. Each word in the sentence is separated by a single space, and the sentence starts with a capital letter. Your task is to rearrange th...
Rearrange words in a sentence based on increasing order of their length.
Split the sentence into words and calculate the length of each word.
Sort the words based on their lengths, keeping the original order for words with the same length.
Join the sorted words back into a sentence.
You are provided with a 9x9 2D integer matrix MAT
representing a Sudoku puzzle. The empty cells in the Sudoku are denoted by zeros, while the other cells contain integers f...
Implement a function to solve a Sudoku puzzle by filling empty cells with valid numbers.
Iterate through each empty cell and try filling it with a valid number (1-9) that satisfies Sudoku rules.
Use backtracking to backtrack and try different numbers if a cell cannot be filled with a valid number.
Check rows, columns, and 3x3 sub-grids to ensure each digit appears only once in each.
Recursively solve the puzzle by filling
Round duration - 40 minutes
Round difficulty - Medium
The interview started with my brief introduction, and the interviewer then proceeded to ask some questions. I was asked to write a code for these two questions:
1. Find the distances between two given nodes of a binary tree.
2. Find the next greater number with the same set of digits.
After I was able to solve both questions, he proceeded to ask some questions about my projects. He seemed interested in the ML project and asked some basic questions regarding the same. We had a brief discussion on how Machine learning can be used in the mechanical Engineering field. He asked me why I was aspiring to become a software engineer despite having a Mechanical engineering background. The round ended with me asking him about the types of projects interns are provided to work on at Goldman
Given a string S
which represents a number, determine the smallest number strictly greater than the original number composed of the same digits. Each digit's frequenc...
The task is to find the smallest number greater than the given number with the same set of digits.
Iterate from right to left to find the first digit that can be swapped with a smaller digit to make the number greater.
Swap this digit with the smallest digit to its right that is greater than it.
Sort all digits to the right of the swapped digit in ascending order to get the smallest number.
Tip 1 : Practice all DSA questions from interview bit
Tip 2 : Do Atleast 3 project one should be major, if it's in web dev it would be beneficial.
Tip 3 : Should be good in communication skills
Tip 1 : Not more than 1 page
Tip 2 : Have atleast 2 projects with some achievement in coding contest and your coding handle should be mentioned like codechef, codeforces , leetcode etc
Tip 3 : Try to keep only those things in resume in which you find yourself comfortable with
Goldman Sachs interview questions for designations
I was interviewed before Sep 2020.
Round duration - 135 minutes
Round difficulty - Medium
The test was conducted on Hackerrank in the evening, and there was no section
based timing.
It basically had 4 parts:
1. Aptitude Section
2. CS Fundamentals including OS, DBMS, OOPs
3. 2 Essay Writing questions(Subjective)
4. 1 Easy, 1 Medium Hard Coding Question
You are given a string consisting of English alphabet characters. Your task is to identify and return the first character in the string that does not repeat...
Given a string, find and return the first non-repeating character. If none exists, return the first character of the string.
Create a dictionary to store the count of each character in the string.
Iterate through the string and populate the dictionary.
Iterate through the string again and return the first character with count 1.
If no such character exists, return the first character of the string.
Round duration - 50 minutes
Round difficulty - Medium
We were provided a link to the zoom meeting and the codepair link where I had to write the code for a given problem.The interviewer first asked me to introduce myself and asked me a little about my project. This took around 10-15 minutes, which was followed by a DSA Question. It was a standard Linked list question. The question was medium difficulty and I was able to code it within the given time, including handling all corner cases.
You are provided with a linked list containing 'N' nodes and an integer 'K'. The task is to reverse the linked list in groups of size K, which means reversing the nodes ...
Reverse a linked list in groups of size K.
Iterate through the linked list in groups of size K
Reverse each group of nodes
Handle cases where the number of elements in the last group is less than K
Round duration - 60 minutes
Round difficulty - Medium
We were provided a link to the zoom meeting and the codepair link where I had to write the code for a given problem.The interviewer first asked me to introduce myself, which was followed by a DSA Question. Lastly, he spent around 10 minutes to discuss about my resume and project.
Given a grid with 'M' rows and 'N' columns, determine the total number of unique rectangles that can be formed using the rows and columns of this grid.
The first lin...
The total number of unique rectangles that can be formed in a grid with M rows and N columns.
The total number of unique rectangles can be calculated using the formula: (M * (M + 1) / 2) * (N * (N + 1) / 2)
Each rectangle can be formed by selecting two rows and two columns from the grid
For example, for a grid with 3 rows and 4 columns, the total number of unique rectangles is 60
You are provided with a list of rectangles, each defined by an array of four integers: Rectangle[i] = [x1, y1, x2, y2]
. Here, (x1, y1)
represents the bottom-left corner, a...
Calculate total area covered by overlapping rectangles given their coordinates.
Iterate through each rectangle and calculate its area
Check for overlaps between rectangles and calculate the overlapping area
Sum up the areas of all rectangles and subtract the total overlapping area to get the final result
Round duration - 45 minutes
Round difficulty - Hard
Tip 1 : 1-2 Projects enough, but at least 1 should be very unique and creative.
Tip 2 : Strong DSA is a must, OS & DBMS equally important.
Tip 3 : Be verbal during the interview.
Tip 1 : One pager.
Tip 2 : No Spelling mistakes at any cost.
Get interview-ready with Top Goldman Sachs Interview Questions
I was interviewed in Sep 2020.
Round duration - 90 minutes
Round difficulty - Hard
Timings of the round were early evening around 7 o'clock.
It was help on hackerearth.
Given two arbitrary binary trees, your task is to determine whether these two trees are mirrors of each other.
Two trees are considered mirror of each other if...
Check if two binary trees are mirrors of each other based on specific criteria.
Compare the roots of both trees.
Check if the left subtree of the first tree is the mirror of the right subtree of the second tree.
Verify if the right subtree of the first tree is the mirror of the left subtree of the second tree.
Tip 1 : Practice on leetcode and coding ninjas
Tip 2 : Compete on codechef and codeforces in live contests
Tip 3 : Learn DSA and practice regularly for at least 2 hours daily
Tip 1 : Keep it short and sweet.
Tip 2 : Try to be more descriptive with your past experiences.
I was interviewed before Sep 2020.
Round duration - 90 minutes
Round difficulty - Easy
This was face to face interview round. The interviewer was very friendly. He started by asking tell me
something about yourself. I told him about my interest in competitive coding(since I am weak in
probability, I always mentioned competitive coding in my introduction so that the interviewer
asks me coding questions and didn’t move to the probability section).
Given an array/list of integers points
containing coordinates (x, y) of N points in a 2D plane, sorted by x-values in non-decreasing order. You need to deter...
Find the maximum value of an equation involving coordinates of points in a 2D plane.
Iterate through all pairs of points and calculate the equation value
Keep track of the maximum value encountered
Consider the constraint |xi - xj| ≤ K while calculating the equation value
Two characters, Tony Stark and Thanos, reside on two separate islands within a 2-D binary matrix of dimensions N x M. Each matrix cell has a value of either 1 (land) or 0...
The task is to find the shortest path of transformed 0s that connects two islands in a binary matrix.
Identify the two islands in the binary matrix.
Find the shortest path between the two islands by converting 0s to 1s.
Output the minimal length of the bridge needed to connect the two islands.
Ninja plans to visit a city where each house is connected via roads in a binary tree structure. Each level of the tree can have at most 2^K houses. Houses at the same leve...
The task is to connect houses at the same level in a binary tree structure using 'next' pointers.
Traverse the binary tree level by level using BFS
Connect nodes at the same level using 'next' pointers
Use a queue to keep track of nodes at each level
Round duration - 40 minutes
Round difficulty - Medium
The interviewer was very friendly to me. She was praising me for every solution that I provided.
Ninja plans to build an apartment in the shape of a rectangle. The goal is to determine the length and breadth of this rectangle such that the length is greater than th...
Given the area of a rectangle, find the length and breadth such that the length is greater than the breadth and the difference between them is minimized.
Iterate through possible combinations of length and breadth
Calculate the area for each combination and check if length is greater than breadth
Select the combination with minimal difference between length and breadth
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell ...
The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.
Iterate through the array of stock prices and calculate the maximum profit that can be achieved by buying and selling at different points.
Keep track of the maximum profit after the first transaction and the maximum profit overall by considering different combinations of buy a...
For a given Binary Tree of integers, replace each of its data with the depth of the tree. The root is at depth 0, hence the root data is updated with 0. Replicate...
Replace each node in a binary tree with its depth starting from root as 0.
Traverse the binary tree in inorder fashion and update each node's data with its depth.
Start with depth 0 for the root node and increment the depth as you go down the tree.
Handle cases where nodes do not have left or right child by taking -1 in their place.
Print the inorder traversal of the tree with updated node data representing the depth.
Round duration - 50 minutes
Round difficulty - Easy
This round was about System Design, Data Structures and Algorithms
Given a sorted array that has been rotated clockwise by an unknown amount, you need to answer Q
queries. Each query is represented by an integer Q[i]
, and you must ...
Search for integers in a rotated sorted array efficiently.
Use binary search to find the pivot point where the array is rotated.
Based on the pivot point, apply binary search on the appropriate half of the array.
Return the index of the integer if found, else return -1.
Example: For input N=5, A=[4, 5, 6, 7, 0, 1, 2], Q=3, Q[i]=[0, 3, 6], output should be 4, -1, 2.
Round duration - 30 minutes
Round difficulty - Medium
THIS WAS A PUZZLE BASED ROUND
Tip 1 : It is important to practice coding consistently because it is what enables you to solve interview-questions in the stipulated time. But before this, it is even important to have a clear understanding of all the data-structures, so that they can be easily implemented as and when required to solve a problem.
Tip 2 : They do not judge you upon the number of internships you have done or the number of projects you have made. A single,good-quality project is sufficient, provided you have in-depth knowledge about it.
Tip 3 : Practise topic-wise questions, participate in lots of coding contests, watch lots of Youtube solutions even after you could solve a question, because you may find a different approach that is efficient than yours,
Tip 1 : Keep your resume short and clear. Mention your projects and internships with a brief description and year of completion.
Tip 2 : Be very honest and figure out only those things in your resume that you really know.
Top trending discussions
based on 2 interviews
3 Interview rounds
Associate
2.3k
salaries
| ₹0 L/yr - ₹0 L/yr |
Analyst
1.7k
salaries
| ₹0 L/yr - ₹0 L/yr |
Vice President
1.6k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Analyst
1.1k
salaries
| ₹0 L/yr - ₹0 L/yr |
Financial Analyst
325
salaries
| ₹0 L/yr - ₹0 L/yr |
JPMorgan Chase & Co.
Morgan Stanley
TCS
Amazon