Goldman Sachs Interview Report
- 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 - 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