Goldman Sachs Interview Report
- 1of 1 vote
AnswersGiven a list of currency exchange rates like this:
EUR/USD => 1.2
USD/GBP => 0.75
GBP/AUD => 1.7
AUD/JPY => 90
GBP/JPY => 150
JPY/INR => 0.6
write a methoddouble convert(String sourceCurrency, double amount, String destCurrency);
For example, convert(EUR, 100, INR)
- kredible November 12, 2017 in Singapore
The method should minimize the number of intermediate conversions.| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 0of 0 votes
AnswersThere is going to be a sale during this month. You are interested in a particular item and you found that different Vendors have different prices during different time periods. You collected the following information:
Vendor => (start date, end date, price) both sides inclusive A => (1, 5, $20) B => (3, 6, $15) C => (2, 8, $25) D => (7, 12, $18) E => (1, 31, $22)
As you can see, there are conflicting entries. You need to print out a non-conflicting schedule of prices, taking the best price from each period:
- kredible November 12, 2017 in Singapore
e.g.
(1, 2, $20), (3, 6, $15), (7, 12, $18), (13, 31, $22)| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java - 3of 5 votes
AnswersGiven two sorted linked lists, how can you combine them into one big sorted list? Do not create additional nodes.
- kredible November 12, 2017 in Singapore| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Java