Add office photos
Employer?
Claim Account for FREE

Goldman Sachs

3.6
based on 1.1k Reviews
Filter interviews by

300+ Sahrudaya Healthcare (Medicover Hospitals) Interview Questions and Answers

Updated 14 Dec 2024
Popular Designations
Q101. Trapping Rain Water

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. Print the total amount of rainwater that ...read more

View 3 more answers
Q102. Next Greater Number

You are given a string S which represents a number. You have to find the smallest number strictly greater than the given number which contains the same set of digits as of the original number...read more

Add your answer

Q103. Find the magic number in an sorted array. magic number is the one whose value and index position is same

Ans.

Find the magic number in a sorted array where value and index are same.

  • Iterate through the array and check if the value and index are same

  • If found, return the value

  • If not found, return -1

Add your answer

Q104. Clarification about what CPI stands(Is it the same as Grade Point Average?)

Ans.

CPI stands for Consumer Price Index, not the same as Grade Point Average (GPA).

  • CPI is a measure of the average change over time in the prices paid by urban consumers for a market basket of consumer goods and services.

  • It is used to track inflation and price changes in the economy.

  • GPA, on the other hand, is a measure of academic performance and represents a student's average grade point across courses.

  • CPI and GPA are completely different concepts and have no relation to each ot...read more

Add your answer
Discover Sahrudaya Healthcare (Medicover Hospitals) interview dos and don'ts from real experiences
Q105. Magical Pattern

Given an integer N as input, the task is to print the Magical Pattern as given below:

N . . 3 2 1 2 3 . . N

. . . . . . . . . . .

3 3 3 3 2 1 2 3 3 3 3

2 2 2 2 2 1 2 2 2 2 2

1 1 1 1 1 1 1 1 1 1 1

2 2 ...read more

View 2 more answers
Q106. Morse Code To English

You are given a string of length N representing the morse code(s). You have to convert this code into the corresponding alphanumeric code containing small case english alphabet[a-z] and di...read more

View 2 more answers
Are these interview questions helpful?
Q107. Maximum Sum of nodes in a binary tree such that no two nodes are adjacent

You have been given a binary tree with an integer value associated to each node. You are supposed to choose a subset of these nodes such ...read more

View 2 more answers
Q108. Validate BST

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 ...read more

View 2 more answers
Share interview questions and help millions of jobseekers 🌟
Q109. Sort Array of Strings

You are given an array of strings 'ARRSTR[]' of size 'N' and a character 'C'. Your task is to sort the 'ARRSTR[]' according to the new alphabetical order that starts with the given characte...read more

View 2 more answers
Q110. Serialize and Deserialize an N-ary tree

You are given an N-ary tree where every node has at most ‘N’ child nodes. You need to first serialize it and then deserialize the serialized tree.

Add your answer
Q111. Implementation: HashMap

Design a data structure that stores a mapping of a key to a given value and supports the following operations in constant time.

1. INSERT(key, value): Inserts an integer value to the data...read more
Add your answer

Q112. How many years will it take the Delhi Metro to break even?

Ans.

The Delhi Metro is expected to break even in 2025.

  • The Delhi Metro has been expanding rapidly and has seen a steady increase in ridership.

  • The metro has been able to generate revenue through advertising and property development.

  • The government has also provided financial support to the metro.

  • Based on current projections, the Delhi Metro is expected to break even in 2025.

View 1 answer

Q113. Dice rolled several times until sum of outcomes till now comes greater than equal to hundred. What is most likely number to occur as final sum?

Ans.

The most likely number to occur as the final sum is 100.

  • The sum of the outcomes of the dice rolls will keep increasing until it reaches or exceeds 100.

  • Since the dice have equal probabilities for each outcome, the sum will have a higher chance of reaching 100.

  • The probability of rolling a sum greater than 100 decreases as the sum gets larger.

Add your answer
Q114. Level Order Traversal

You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.

For example:
For the given binary tree 

Example

The level order traversal wil...read more
Add your answer
Q115. Merge Intervals

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 re...read more

View 2 more answers
Q116. NINJA’S APARTMENT

Ninja is planning to build a new apartment but he wants an apartment in the shape of a rectangle whose length is greater than the breadth of the rectangle. Also, the difference between the leng...read more

View 2 more answers
Q117. Check if two trees are Mirror

You are given two arbitrary binary trees consisting of N and M number of nodes respectively, your task is to check whether the two trees are mirror of each other or not.

Two trees a...read more

View 2 more answers
Q118. Minimize the Maximum

You are given an array of N integers and an integer K. For each array element, you are allowed to increase or decrease it by a value k. The task is to minimize the difference between the max...read more

View 3 more answers
Q119. Arithmetic Progression Queries

Given an integer array(ARR) of size N, the following operations need to be performed:

update(l, r, val) : Add (val + i) to arr[l + i] where, 0 <= i <= r - l. rangeSum(l, r): return...read more
View 4 more answers

Q120. What is the expected number of tosses of a fair coin to get 3 consecutive heads?

Ans.

Expected number of tosses of a fair coin to get 3 consecutive heads.

  • The probability of getting 3 consecutive heads is 1/8

  • The expected number of tosses to get 3 consecutive heads is 14

  • This can be calculated using the formula E(X) = 2^k + 2^(k-1) + 2^(k-2) + ... + 2^2 + 2^1 + 2^0, where k is the number of consecutive heads required

Add your answer

Q121. Why are gold prices increasing and why are US treasury bonds still valuable?

Ans.

Gold prices are increasing due to economic uncertainty and inflation concerns. US treasury bonds remain valuable due to their safe-haven status and reliable returns.

  • Gold prices are increasing due to economic uncertainty and inflation concerns.

  • Investors often turn to gold as a safe-haven asset during times of market volatility.

  • The demand for gold is also influenced by factors such as geopolitical tensions and central bank policies.

  • US treasury bonds are still valuable because t...read more

Add your answer
Q122. Excel Sheet | Part-2

You are given a string STR representing the column title in an Excel Sheet. You need to find its corresponding column number.

For example: A corresponds to 1, B to 2, C to 3, … , Z to 26, AA...read more

Add your answer
Q123. Minimum Number of Platform Needed

You are given the arrival and departure times of N trains at a railway station in a day. You need to find the minimum of platforms required for the railway station such that no ...read more

View 3 more answers

Q124. How many airplanes are flying in the Indian sky at the moment?

Ans.

The exact number of airplanes flying in the Indian sky at the moment is not available.

  • The number of airplanes flying in the Indian sky changes constantly.

  • It depends on factors such as time of day, weather conditions, and airline schedules.

  • However, on average, there are around 2,000 flights in the Indian airspace at any given time.

  • This number includes both domestic and international flights.

  • The Indian aviation industry has been growing rapidly in recent years, with more and mo...read more

Add your answer
Q125. Minimum number of swaps required to sort an array

You have been given an array 'ARR' of 'N' distinct elements.

Your task is to find the minimum no. of swaps required to sort the array.

For example:
For the given...read more
View 2 more answers
Q126. Transitive Closure of Directed Graph

You are given a directed graph consisting of 'V' vertices and 'E' edges. You need to find whether a vertex i is reachable from all other vertices j for all pairs of vertices ...read more

View 2 more answers
Q127. Flatten The Multi-Level Linked List

You are given a multi-level linked list of N nodes, each node has a next and child pointer which may or may not point to a separate node. Flatten the multi-level linked list i...read more

Add your answer
Q128. Two and Four Wheeler Roads

There is a country with 'N' cities and 'M' bidirectional roads of 3 types.

Type 1: Two Wheeler Road, It means only vehicles having two wheels can use this road. Type 2: Four Wheeler R...read more
View 2 more answers
Q129. Simplify the Directory

You are given a path to a file/directory in Unix-style of length N, In a Unix-style file system, a dot(.) refers to the current directory. A double dot(..) refers to the previous directory...read more

Add your answer
Q130. Rat In A Maze

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a squar...read more

Add your answer
Q131. Rearrange Odd and Even Places

You are given the head of a singly linked list, group all the nodes with odd indices together followed by the nodes with even indices, and return the reordered list’s ‘HEAD.’

The fi...read more

Add your answer
Q132. Number of rectangles in a grid

You are given an arbitrary grid with M rows and N columns. You have to print the total number of rectangles which can be formed using the rows and columns of this grid. In simple w...read more

Add your answer

Q133. Cutting three random points on the circle of radius 1 centered at (0,0) . What is probability that point (1,0) lies in longest cut

Ans.

Finding probability of point (1,0) lying in longest cut of three random points on circle of radius 1 centered at (0,0)

  • The longest cut will be the one that spans the smallest angle between two of the three points

  • The probability can be found by calculating the area of the region where the longest cut includes point (1,0)

  • This can be done by finding the angle between (1,0) and the two other points and using trigonometry to calculate the area of the corresponding sector of the cir...read more

Add your answer

Q134. What is a call option? Why are call options bought?

Ans.

A call option is a financial contract that gives the buyer the right, but not the obligation, to buy an underlying asset at a predetermined price within a specified time period.

  • Call options are bought by investors who believe that the price of the underlying asset will rise in the future.

  • The buyer of a call option pays a premium to the seller for the right to buy the asset at a predetermined price, known as the strike price.

  • If the price of the asset rises above the strike pri...read more

Add your answer
Q135. Minimum Calls

There is a group of people and a special person in the group who does not know anybody, while other people in the group know him. Given a function: find(A, B) -> which returns True if A knows B and...read more

Add your answer
Q136. Rearrange words in a sentence

You are given a sentence 'TEXT'. Each word of 'TEXT' is separated by a single space and the first letter of 'TEXT' is capital. You need to rearrange the words of Text in increasing ...read more

Add your answer
Q137. Find rank

You are given a matrix ‘ARR’ having dimensions ‘N*M’. Your task to find the rank of the matrix ‘ARR’.

The rank of a matrix is defined as:

(a) The maximum number of linearly independent column vectors i...read more
Add your answer
Q138. Number Of Triangles In An Undirected Graph

Given an undirected graph, find how many triangles it can have where a triangle is a cyclic path of length three which begins and end at the same vertex.

#### An undire...read more

Add your answer
Q139. Pigeon Hole Puzzle

My wife and I recently attended a party at which there were four other married couples. Various handshakes took place. No one shook hands with oneself, nor with one's spouse, and no one shook ...read more

Add your answer

Q140. How do you calculate the price of a call option?

Ans.

The price of a call option is calculated using the Black-Scholes model which takes into account the underlying asset price, strike price, time to expiration, risk-free interest rate, and volatility.

  • Determine the current price of the underlying asset

  • Determine the strike price of the option

  • Determine the time to expiration of the option

  • Determine the risk-free interest rate

  • Determine the volatility of the underlying asset

  • Plug these values into the Black-Scholes model to calculate ...read more

Add your answer
Q141. Maximum Subarray Sum

Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum.

View 6 more answers
Q142. Basic Puzzles

1. There are 5 lanes on a race track. One needs to find out the 3 fastest horses among total of 25. Find out the minimum number of races to be conducted in order to determine the fastest three.

Add your answer

Q143. How many ways can a king go from one end of the chessboard to the diagonally opposite square(The king can move only towards the corner and not diagonally)

Ans.

The king can move only towards the corner and not diagonally. How many ways can a king go from one end of the chessboard to the diagonally opposite square?

  • The king can only move towards the corner, so there are limited options for each move

  • The total number of moves required to reach the opposite corner is 14

  • Using combinatorics, the total number of ways the king can reach the opposite corner is 3432

Add your answer
Q144. Software Engineering Question

What is an SDLC?

Add your answer

Q145. Design Problem: You have a database of million records, that needs to be acessed for each operation. That database is updated very rarely. And there are multiple processes that queries the database and operates...

read more
Ans.

Implement a caching mechanism to optimize database access for multiple processes.

  • Implement a caching layer to store frequently accessed records in memory

  • Use a cache eviction policy to remove least recently used records from the cache

  • Update the cache whenever the database is updated

  • Consider using a distributed cache if the processes are running on different machines

Add your answer

Q146. How to create a uniform distribution from 1 to 200 using an ubiased coin?

Ans.

To create a uniform distribution from 1 to 200 using an unbiased coin, we can use the rejection sampling method.

  • Divide the range into equal parts based on the number of outcomes of the coin toss.

  • Toss the coin and select the corresponding part of the range.

  • If the selected number is outside the desired range, reject it and repeat the process.

  • Repeat until a number within the desired range is obtained.

  • Example: If the coin has 2 outcomes, divide the range into 2 parts of 100 each....read more

Add your answer

Q147. An IT sector company wants to increase the number of BPOs in India. Devise a metric that will help it rank cities according to their favourability to host this BPO

Ans.

A metric to rank Indian cities for BPOs

  • Consider factors like availability of skilled workforce, infrastructure, cost of living, and government policies

  • Weight each factor based on its importance to the company

  • Collect data on each factor for different cities and assign scores

  • Rank cities based on their total score

  • Examples of factors: number of universities, quality of transportation, cost of office space, tax incentives

  • Regularly update the metric to reflect changes in the busine...read more

Add your answer

Q148. Given two arrays of size n each, describe an algorithm to find the largest common subarray of the two arrays

Ans.

Algorithm to find largest common subarray of two arrays of size n

  • Create a 2D array to store the lengths of common subarrays

  • Traverse both arrays and fill the 2D array with lengths of common subarrays

  • Find the maximum length and its corresponding ending index in the 2D array

  • Use the ending index to retrieve the largest common subarray from either of the arrays

Add your answer

Q149. Variants of using random number generators/Monte Carlo Simulations to generate value of Pi and other quantities

Ans.

Random number generators and Monte Carlo simulations can be used to estimate the value of Pi and other quantities.

  • Monte Carlo simulations involve generating random numbers to estimate a value or solve a problem

  • To estimate Pi, random points are generated within a square and the ratio of points inside a circle to total points is used

  • Other quantities can be estimated using similar principles, such as estimating the area under a curve or the value of an integral

Add your answer
Q150. Case Study

There is a city with bad roads. You have to repair the roads. How will you find the roads which are in bad condition? What parameters you will take to check if the road is in good condition? How will ...read more

Add your answer

Q151. Design a game (Automaton) for a betting scenario. Bet is either doubled or lost completely depending on whether you win or lose. Suppose you bet on team A constantly in a 2 team game, how much money you need in...

read more
Add your answer

Q152. Puzzle: You have two train carriages situated at a different point on a infinite train track. The carriage can move up and down , and given that they can only know whether the other train has started from this ...

read more
Add your answer

Q153. Row sorted and column sorted matrix problem of finding an element.

Ans.

The problem involves finding an element in a matrix that is sorted both row-wise and column-wise.

  • Start from the top-right corner of the matrix

  • Compare the target element with the current element

  • If the target is smaller, move left; if larger, move down

  • Repeat until the target is found or the matrix boundaries are crossed

Add your answer

Q154. What do you understand in KYC, KYC documents? In your previous organisation what did you learn? Can you tel something about what solution have you solve and what are the outcomes? Questions based on process imp...

read more
Ans.

KYC refers to the process of verifying the identity of customers and assessing their potential risks.

  • KYC stands for Know Your Customer

  • KYC documents include identity proof, address proof, and other relevant documents

  • In my previous organization, I learned about the importance of verifying customer identities to prevent fraud and financial crimes

  • I have implemented process improvements to streamline the KYC process and reduce turnaround time

  • The outcomes of these solutions were im...read more

View 1 answer

Q155. Design problem: You have a socket connection on client side. And that socket connection receives million ticks per second for every stocks. Suppose you have 50 stocks. So the value of each stock is changing 10,...

read more
Add your answer

Q156. Different efficient ways to implement product and summation of n numbers. And limitations

Ans.

Efficient ways to implement product and summation of n numbers with limitations.

  • For summation, use a loop or built-in functions like sum() or reduce().

  • For product, use a loop or built-in functions like prod() or reduce().

  • Limitations include overflow errors for large numbers and memory constraints for very large arrays.

  • Using parallel processing or vectorization can improve efficiency.

  • Consider using data structures like binary trees or prefix sums for faster calculations.

Add your answer

Q157. Given a matrix containing several positive numbers find max path from bottom left to top right using only up and right steps

Ans.

Find max path from bottom left to top right in a matrix using only up and right steps.

  • Start from bottom left corner and move towards top right corner.

  • At each step, choose the maximum value between the cell above and the cell to the right.

  • Keep track of the sum of values in the chosen path.

  • The final sum is the maximum possible sum of values in a path from bottom left to top right.

Add your answer

Q158. If You have an infinite array then how many ways to sort it and also tell the complexities

Ans.

There are infinite ways to sort an infinite array with varying complexities.

  • Sorting algorithms like QuickSort, MergeSort, HeapSort, etc. can be used to sort the array.

  • The time complexity of sorting algorithms varies from O(n log n) to O(n^2).

  • The space complexity also varies depending on the algorithm used.

  • Sorting an infinite array is not practical, so it is usually done in chunks or using parallel processing.

  • The sorting order can be ascending or descending based on the requir...read more

Add your answer

Q159. You have a rod of length 7 and you have to give a part of rod of length of one everyday to a person. so what is the minimum number of cuts you will do , so that you can give him required number of lengths every...

read more
Ans.

The minimum number of cuts required is 6.

  • To give a part of rod of length one everyday, we need to divide the rod into 7 equal parts.

  • Each cut will create two new lengths, so we need 6 cuts to obtain 7 equal parts.

  • The cuts can be made at any point along the rod, as long as the resulting lengths are equal.

Add your answer

Q160. What is one key ratio you would look at for upstream companies ? (reserve replacement ratio for oil &amp; gas)

Ans.

The reserve replacement ratio is a key ratio to evaluate the ability of upstream companies to replace the reserves they produce.

  • The reserve replacement ratio compares the amount of reserves added to the amount of reserves produced in a given period.

  • A ratio above 100% indicates that the company is replacing more reserves than it is producing.

  • A ratio below 100% indicates that the company is producing more reserves than it is replacing.

  • The reserve replacement ratio is important ...read more

Add your answer

Q161. What do you know about options?

Ans.

Options are financial contracts that give the buyer the right, but not the obligation, to buy or sell an underlying asset at a predetermined price.

  • Options can be used for hedging or speculation

  • There are two types of options: call options and put options

  • Call options give the buyer the right to buy the underlying asset at a predetermined price, while put options give the buyer the right to sell the underlying asset at a predetermined price

  • Options have expiration dates and strik...read more

Add your answer

Q162. How would you design an elevator system for a building?

Ans.

Designing an elevator system for a building involves considering factors like capacity, speed, safety, and efficiency.

  • Determine the number of floors and the expected traffic flow in the building

  • Calculate the required capacity and speed of the elevators

  • Consider safety features such as emergency stop buttons, fire-resistant materials, and backup power supply

  • Implement efficient algorithms for elevator scheduling to minimize waiting time

  • Incorporate user-friendly features like cle...read more

Add your answer
Q163. Puzzle

There are 3 ants sitting on three corners of a triangle. All ants randomly pick a direction and start moving along the edge of the triangle. What is the probability that any two ants collide?

Add your answer
Q164. Puzzle

a person has 3000 bananas and a camel. He wants to transport the maximum number of bananas to a destination which is 1000 KMs away Camel eats 1 banana for every km. What is the maximum number of bananas t...read more

Add your answer
Q165. Puzzle

Basic questions related to speed time distance, profit-loss, prime factors, etc

Add your answer

Q166. A person can climb 1 or 2 stairs. Find the number of ways to jump n stairs

Ans.

Number of ways to jump n stairs if a person can climb 1 or 2 stairs.

  • Use dynamic programming to solve the problem.

  • The number of ways to jump n stairs is equal to the sum of ways to jump n-1 stairs and ways to jump n-2 stairs.

  • Base cases: if n=0, return 1 and if n=1, return 1.

Add your answer

Q167. How would you code a linked list? Show the code

Ans.

A linked list is a data structure where each element contains a reference to the next element.

  • Create a Node class with data and next pointer

  • Create a LinkedList class with head pointer

  • Implement methods like insert, delete, search, etc.

Add your answer

Q168. Given a 2d matrix sorted row and column wise, search an element

Ans.

Searching an element in a sorted 2D matrix

  • Start from the top-right corner or bottom-left corner

  • Compare the target element with the current element

  • Move left or down if the target is smaller or move right or up if the target is larger

Add your answer

Q169. Efficient algorithms on calculating Fibonacci’s Sequence

Ans.

Efficient algorithms for calculating Fibonacci's sequence

  • Use dynamic programming to avoid redundant calculations

  • Implement matrix exponentiation to reduce time complexity to O(log n)

  • Use memoization to store previously calculated values

  • Iterative approach using constant space complexity

  • Binet's formula for direct calculation of nth Fibonacci number

Add your answer
Q170. Word Search

You have been given a column title as appears in an Excel sheet, return its corresponding column number.

For example:
A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... 
Input Format
The only lin...read more
Add your answer
Q171. DBMS Question

What is Data modelling?

Add your answer
Q172. Excel Column Number

You have been given a column title as appears in an Excel sheet, return its corresponding column number.

For example:
A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... 
Input Format
The ...read more
Add your answer
Q173. Archer Problem : Puzzle

An archer is hitting the target(a circle). He fires the first shot and then the second shot. Given that his

shot was better than the second. Find the probability that the third shot that h...read more

Add your answer

Q174. Puzzle: there are two candles and each candle take 30 minutes to burn. How will you measure 45 minutes? You dont have any instruments with you

Add your answer

Q175. What is the probability of a 8 bit string to have no more than 2 consecutive 1's. This might seem like a probability question :p. But it is actually dynamic programming.

Ans.

Probability of an 8 bit string with no more than 2 consecutive 1's using dynamic programming.

  • Use dynamic programming to calculate the probability of a string with no more than 2 consecutive 1's

  • Create a 2D array to store the probabilities of each bit position and number of consecutive 1's

  • Use recurrence relation to calculate the probability for each bit position based on the previous bit position

  • Sum up the probabilities for all possible combinations of the last bit position and...read more

Add your answer
Q176. Time to Burn Tree

Given a node, how long will it take to burn a whole binary tree?

View 3 more answers

Q177. You are given ROE for 2 IT companies? how would you find out which is undervalued &amp; overvalued?

Ans.

Compare ROE of 2 IT companies to determine undervalued and overvalued.

  • Calculate the average ROE for the industry to use as a benchmark

  • Compare the ROE of the two companies to the industry average

  • Consider other factors such as growth potential, debt levels, and market share

  • Use valuation methods such as P/E ratio and discounted cash flow analysis

  • Undervalued company will have lower ROE than industry average and lower valuation metrics

  • Overvalued company will have higher ROE than i...read more

Add your answer
Q178. Puzzle

There is a room with a door (closed) and three light bulbs. Outside the room, there are three switches, connected to the bulbs. You may manipulate the switches as you wish, but once you open the door you ...read more

Add your answer
Q179. Probability Puzzle

Given a point on the perimeter of the circle and an interior point. Find the probability that the rectangle formed with diagonal as the line segment joining these points lies inside the circle...read more

Add your answer

Q180. What is the difference between OOP and procedural programming?

Ans.

OOP focuses on objects and their interactions, while procedural programming focuses on procedures and functions.

  • OOP organizes code into objects that encapsulate data and behavior.

  • Procedural programming uses functions to manipulate data.

  • OOP supports concepts like inheritance, polymorphism, and encapsulation.

  • Procedural programming is more straightforward and linear in nature.

  • OOP promotes code reusability and modularity.

  • Procedural programming is often used for small-scale projec...read more

Add your answer
Q181. Puzzle

Given a point on the perimeter of the circle and an interior point. Find the probability that the rectangle formed with diagonal as the line segment joining these points lies inside the circle.

Add your answer
Q182. DS Question

I mentioned front-end web developer internship in my resume, so he asked me which data structures I have used in frontend web development

Add your answer

Q183. randN function : which generates random number in [1,2,3..N] with equal probability. Given rand5, write a code for rand7 using rand5

Ans.

Code for rand7 using rand5 function

  • Use rand5 twice to generate a number in [1,25] with equal probability

  • If the number is greater than 21, discard and try again

  • Otherwise, return (number mod 7) + 1

Add your answer
Q184. Technical Questions

What is the difference between SQL and NoSQL databases?

How does the variable declaration and the corresponding data type allotment done in Javascript?

Add your answer

Q185. 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 necessary for certain tasks such as memory isolation and pr...read more

Add your answer
Q186. DBMS Question

What is ER Model?

Add your answer
Q187. OS Question

What are Semaphores? Explain in detail

Implementing the LRU Cache and its uses

Add your answer
Q188. OS Questions

What is deadlock and how you can prevent it?
What is difference between process and thread?
Explain critical section.

Add your answer

Q189. 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)

Add your answer
Q190. Technical Questions

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

Add your answer

Q191. Write code for implementing Tower of Hanoi problem. What data structures you will use? How will you implement the Move function(that moves the disc)

Ans.

Tower of Hanoi is a mathematical puzzle that involves moving a stack of disks from one peg to another peg.

  • Tower of Hanoi problem involves three pegs and a number of disks of different sizes.

  • The goal is to move all the disks from the source peg to the destination peg, using the auxiliary peg.

  • The Move function can be implemented recursively by following the steps:

  • 1. Move n-1 disks from source to auxiliary peg.

  • 2. Move the nth disk from source to destination peg.

  • 3. Move the n-1 d...read more

Add your answer

Q192. What is chargeback and explain the chargeback cycle?

Ans.

Chargeback is a transaction reversal made by a bank or credit card issuer, usually due to fraud or disputed charges.

  • Chargeback occurs when a customer disputes a charge and the bank or credit card issuer reverses the transaction.

  • The merchant is notified of the chargeback and can either accept it or dispute it.

  • If the chargeback is accepted, the merchant loses the sale and may be charged a fee.

  • If the chargeback is disputed, the bank or credit card issuer investigates and makes a...read more

Add your answer
Q193. System Design Question

He asked me to do a system design for a website like Instagram which can be used by travellers.

Add your answer

Q194. Write an algorithm which will make the train carriages meet. The same algorithm should run on both the carriages

Ans.

Algorithm to make train carriages meet

  • Use a two-pointer approach

  • Start with two pointers at opposite ends of the array

  • Move the pointers towards each other until they meet

Add your answer

Q195. Given a list of numbers give an algorithm that to find 2 numbers that add up to 600. He asked me to improve the complexity with every attempt I made finally got it down to complexity of O(N)

Ans.

Algorithm to find 2 numbers that add up to 600 from a list of numbers with O(N) complexity.

  • Use a hash table to store the difference between each number and 600.

  • Iterate through the list and check if the difference is in the hash table.

  • If the difference is in the hash table, return the current number and the difference.

Add your answer
Q196. System Design Question

Parking Lot design

Add your answer
Q197. HR Questions

What language do you code in ?
Situational Problem

Add your answer

Q198. you have been given a tree(not binary tree), and the last level of the tree is doubly linked list(i.e. first node of that level connected to last node and adjacent to it and similarly for all nodes of that leve...

read more
Add your answer

Q199. N door puzzle. ith user changes state of doors which are multiples of i. Calculate number of doors opened in the end

Add your answer

Q200. Fiscal Deficit crowds out private investment – True or False. Why?

Ans.

True. Fiscal deficit leads to higher interest rates, reducing private investment.

  • Fiscal deficit leads to higher government borrowing, increasing demand for credit

  • Higher demand for credit leads to higher interest rates

  • Higher interest rates make borrowing expensive for private investors

  • Expensive borrowing reduces private investment

  • Examples: India's fiscal deficit led to high interest rates, reducing private investment in 2013-14

Add your answer
1
2
3
4

More about working at Goldman Sachs

HQ - New York, New York, United States (USA)
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Sahrudaya Healthcare (Medicover Hospitals)

based on 131 interviews in the last 1 year
Interview experience
4.2
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.2
 • 384 Interview Questions
3.7
 • 262 Interview Questions
4.2
 • 139 Interview Questions
3.7
 • 135 Interview Questions
3.7
 • 133 Interview Questions
View all
Top Goldman Sachs Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter