Goldman Sachs Interview Questions
- 0of 0 votes
AnswersWe have rectangular and inside many rectangular were drawn.So if we click on main Rectangular we should get the count of rectangular's ..For this how can we implement in java
- pogiriykirankumar January 10, 2015 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer - 0of 0 votes
AnswersWe have a Very big which our datatypes does not provide.
- Vanquisher January 10, 2015 in India
We need to multiply such numbers, how to do?
example :
Num1 = {1,2}, Num2 = {1,0} then ans would be {1,2,0}
Num1 ={5,3,6,2,8,2,0,2,8}, num2 ={3,5,2,3,2,1,}
then ans would be the multiplication value of 5362882028 X 352321| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer Algorithm - 0of 0 votes
AnswersYou to find the shortest palindrome string by adding 0 or more characters on the right side of the string.
- Vanquisher January 10, 2015 in India
for example:
string is java then answer would be avajava
string is enm then mnemn
string is aavaa then aavaa| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswerHow to implement your own Hashmap?
- Vanquisher January 10, 2015 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - -1of 1 vote
AnswersYou have infinite number of 3Rs coins and 5Rs coins. And your are provided one random number and u need to find out that whether you can make the amount with both denominations.
- Vanquisher January 10, 2015 in India
for example:
U r given a number: 23 then 5*4 +3 = 23 so true
U r given a number :16 then False.| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswersYou have a string and you need to find the shortest palindrome string from that string by adding 0 or more characters on right side of the string.
- Vanquisher January 10, 2015 in India
example:
String is java then answer would be avajava
String is emme then emme
String is hcasach| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswerHow to implement your own HashMap??
- Vanquisher January 10, 2015 in India
How to handle the collision using some chaining technique?| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswersWe have a Very big which our datatypes does not provide.
- Vanquisher January 10, 2015 in India
We need to multiply such numbers, how to do?
example :
Num1 = {1,2}, Num2 = {1,0} then ans would be {1,2,0}
Num1 ={5,3,6,2,8,2,0,2,8}, num2 ={3,5,2,3,2,1,}
then ans would be the multiplication value of 5362882028 X 352321| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswersYou have infinite number of 3Rs coins and 5Rs coins. And your are provided one random number and u need to find out that whether you can make the amount with both denominations.
- Vanquisher January 10, 2015 in India
for example:
U r given a number: 23 then 5*4 +3 = 23 so true
U r given a number :16 then False.| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer Algorithm - 0of 0 votes
AnswersFind out the least recent occurred message.
- Vanquisher January 10, 2015 in India
Suppose your are getting message in streams, and you add it using add("M1").
You need to find out the least recent occurred message at any point of time.
for example,
Add("M1')->Add("M2') then LROM=M1
Add("M1')->Add("M2')->Add("M1') then LROM =M2
Add("M1')->Add("M2')->Add("M1')->Add("M3')-> then LROM =M2
Hope question is clear.| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer Algorithm - 0of 0 votes
AnswersCreate a random number generator within the given range? what if no range given? it should not repeat the sequence of random numbers generator before and after JVM is re-booted?
- poojaarora014 October 26, 2014 in India| Report Duplicate | Flag | PURGE
Goldman Sachs SDET Algorithm - 0of 0 votes
AnswersGiven an input string, write a function that returns the Run Length Encoded string for the input string.
- sharma October 14, 2014 in India
For example, if the input string is “wwwwaaadexxxxxx”, then the function should return “w4a3dex6″.| Report Duplicate | Flag | PURGE
Goldman Sachs Java Developer Algorithm - 0of 0 votes
AnswersGiven a string .Check if the string is palindrome or not
- sharma October 14, 2014 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Java Developer Java - 1of 3 votes
AnswersA Multi-threaded server application stops working and the last log message from the application is:
"Some Server Related Message..."
Code looks like:
CalledFunc () { Code ... Acquiring Thread lock Line printing "Some Server Related Message..." Func(); Releasing Thread Lock }
1. What should the programmer in charge do to debug this?
- joe.wynton October 07, 2014 in United States for Trading System
2. What has happened wrong in the Func()?
3. If an exception is thrown in the Func() what should be done to fix problem ?| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer C# C C++ Threads - 0of 0 votes
AnswersA Multi-threaded server application stops working and the last log message from the application is:
"Some Server Related Message..."
Code looks like:
CalledFunc () { Code ... Acquiring Thread lock Line printing "Some Server Related Message..." Func(); Releasing Thread Lock }
1. What should the programmer in charge do to debug this?
- joe.wynton October 07, 2014 in United States
2. What has happened wrong in the Func() ?
3. If an exception is thrown in the Func() what should be done to fix problem ?| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer C# C C++ Threads - 0of 0 votes
Answers[Phone screen]
- utopia August 12, 2014 in United States
Let's say I gave you a long String and I wanted you to tell me the most common word in that String. How would you do that?
follow-up: OK, how would you estimate the size and time complexity of this solution? How would you estimate the ACTUAL size usage? (Hint: how many words are in the English language? Would having a dictionary in front of you help?)
follow-up #2: OK, how about if I gave you the entire works of Alexandre Dumas, one of the most prolific authors in history. How would your solution work? How could you change it to solve this more specific problem?
follow-up #3: Now, what if we wanted to find the most common PHRASE in his writings. (Upon clarification, the interviewer wouldn't give a specific length, so I clarified to finding as long as a common 10 word phrase, because anything longer is unlikely.)| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Algorithm Hash Table - 0of 0 votes
Answers[Phone screen]
- utopia August 12, 2014 in United States
Tell me about the Java Collections framework, what are its main interfaces. OK, what are the main differences between the Set and List interfaces? What do you give up if you go from a List to a Set, and what do you get in exchange for this if you go from a List to a Set? How would you go about guessing the order of an iteration() of HashSet if I told you I was going to insert the strings "first", "second", "third", "forth", and "fifth"?| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 2of 2 votes
AnswerLet's say I gave you a long String and I wanted you to tell me the most common word in that String. How would you do that?
- utopia August 12, 2014 in United States
follow-up: OK, how would you estimate the size and time complexity of this solution? How would you estimate the ACTUAL size usage? (Hint: how many words are in the English language? Would having a dictionary in front of you help?)
follow-up #2: OK, how about if I gave you the entire works of Alexandre Dumas, one of the most prolific authors in history. How would your solution work? How could you change it to solve this more specific problem?
follow-up #3: Now, what if we wanted to find the most common PHRASE in his writings. (Upon clarification, the interviewer wouldn't give a specific length, so I clarified to finding as long as a common 10 word phrase, because anything longer is unlikely.)| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Algorithm Hash Table - 0of 0 votes
AnswersTell me about the Java Collections framework, what are its main interfaces. OK, what are the main differences between the Set and List interfaces? What do you give up if you go from a List to a Set, and what do you get in exchange for this if you go from a List to a Set? How would you go about guessing the order of an iteration() of HashSet if I told you I was going to insert the strings "first", "second", "third", "forth", and "fifth"?
- utopia August 12, 2014 in United States| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
Answers[Phone screen]
- utopia August 12, 2014 in United States
Tell me what you know about the java.lang.Object class. OK, what are best practices for the equals method? How would you implement an equals method for a class with 100s of data fields?| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 1of 1 vote
AnswersYou have 5 data sources. There is a program which calls these data sources and returns a count value.
You need to speedup this program. How do you do that?
This is a sample code
- dmrrb1980 July 01, 2014 in United Statesint count = getCount(ds1); if(count < 100 ) count = count + getCount(ds2); if(count < 100) count = count + getCount(ds3); if(count < 100) count = count + getCount(ds4); if(count < 100) count = count + getCount(ds5);
| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Threads - 0of 0 votes
AnswersHow would one design a multi format converter that supports reading data from multiple data sources(web service, local disk, etc.). The data from the sources can be in multiple formats. The reader for each format may be different and how does one serialize this abstract data to multiple formats like image, xml etc. New readers, writers and data sources can be added later during implementation.
- sukhvinder.pal April 24, 2014 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Software Architect Object Oriented Design - 5of 5 votes
Answerswhy strings are immutable ?
- tare.rohan November 11, 2013 in India
how many objects will be created in
String temp = "A" + "B" + "C" ;
explain your answer in detail.| Report Duplicate | Flag | PURGE
Goldman Sachs Java Developer Java - 1of 1 vote
AnswersFind Common Ancestor of given two nodes A and B
- MrA October 22, 2013 in United States
Condition :Node does not have the parent pointer and data value.
So its is like class Node {
Node L;
Node R;
}
I mentioned below Solution. Since they didnt give me Parent I created one for each node than did back tracking from two given Nodes A & B;
Node commonAncestor(Node A, Node B, Node root){
HashMap<Node> map=new HashMap<Node>();
Queue q=new Queue();
map.(root,null);
q.enqueue(root);
while(!q.isEmpty()){
Node curr=q.dequeue();
if(curr.L !=null)
map.put(curr.L,cur);
if(curr.R !=null)
map.put(curr.R,cur);
}
Node prev=A;
Node next=null;
while(map.contains(prev)){
next= map.get(prev);
map.remove(prev);
prev=next;
}
prev=B;
next=null;
while(map.contains(prev)){
prev=map.get(prev);
}
}| Report Duplicate | Flag | PURGE
Goldman Sachs - 0of 0 votes
AnswersHow reverse key index helps in faster data reading and what is use case for this?
- java.interviews.questions September 18, 2013 in India
Complexity of B tree index?| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer Database - 0of 0 votes
AnswersExplain Hash and how hashing works?
- java.interviews.questions September 18, 2013 in India
Another question was on why HashMaps stores same hashcode entry in map as linkedlist, why not it is storing as ArrayList?| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer Algorithm - 0of 0 votes
AnswersExplain Quick sort and how to choose Pivot value in this sorting.
- java.interviews.questions September 18, 2013 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer Algorithm - 0of 0 votes
AnswersRockets are launched until the first successful launching
- anshul221 September 14, 2013 in United States
has taken place.if this does not occur within 5 attempts,the
experiment is halted and the equipment inspected.suppose that
there is a constant probability of 0.8 of having a successful
launching and that successive attempts are independent.Assume
that the cost of the first launching is K dollars while subsequent
launching cost K/3 dollars.whenever a successful launching take place,a certain amount of information
is obtained which may be expressed as financial gain of,say 'C' dollars.if 'T' is the net cost of this
experiment,find the probability distribution of T?| Report Duplicate | Flag | PURGE
Goldman Sachs Intern Probability - 0of 0 votes
AnswersDesign high throughput trading application? Application is hosted in NY and we have traders all over the world accessing this application. What things we need to take care on designing this application.
- java.interviews.questions September 11, 2013 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Java Developer Java