Skip to content
Related Articles

Related Articles

Goldman Sachs Interview for Java Developer in Hong Kong (10 Years Experienced)

Improve Article
Save Article
  • Last Updated : 26 Apr, 2022
Improve Article
Save Article

Round 1: This was a Coderpad round. Duration-75 minutes. Need to code while the interviewer monitors your approach. This round had 2 questions to code.

  • The question was to find a number that is divisible by only Prime numbers. If yes then return true or else false.
    ex- 15: it can be divided by 3, and 3 is a prime number, then return true.
    17: it is a prime itself then returns true.
    18: it can be divided by 6, which is not a prime number, return false.

Code: You need to build the function body from scratch.

  • The question was to calculate the minimum distance/2 between 2 given strings inside a Paragraph. The string can be duplicated. And ignore case-sensitive punctuation (like commas or full stops)
    For example, The paragraph: “The quick brown fox jumps over the lazy dog, is an English-language pangram.”
    Given strings: (fox, the), the answer should be 12/2 = 6
    Explanation: Between fox and the, there is the string ”  jumps over ” length = 12 and divided by 2 = 6, it can be in decimal like x.5
    You need to ignore first “The” as the distance is bigger.

Code: You have been given a solution, but that was not correct, you need to modify those and correct the solution and make all test cases pass.

I completed all codes, except the punctuation test case was failing, and got an interview timeout. But this round was cleared and proceed to the next round.

Round 2: Round two was a Zoom interview with 2 interviewers:- Time 60 minutes
Started with a formal introduction, current work, and experience.

  • You have given 2 files, which contain some string at each line. You have to compare all strings in both files and return true if both files have an exact number of strings in any order. I provided a solution with HashMap to hold the count of each string and then another HashMap to hold the count and then compare each other. Then interviewer ask to perform with a single HashMap, I answered we can hold count in HashMap for the first file and then keep deducting count for the second file if the count is less than zero for any string or string not found then return false. At last, check HashMap if any count is greater than zero returns false. 
    Then follow up questions about complexity calculation about the solutions I provided.
  • You have n number of the sorted list, it can have duplicate elements. you have to print it in sorted order together.
    I provided a solution, we can merge all first and then sort it through Collections. sort(), then follow-up questions about the sorting algorithm, I explained Merge sort but could not answer the exact time complexity.

Then the interviewer asked me to solve with a different approach, I tried to solve by explaining, We can iterate over that collection of lists all having sorted numbers. We will pick one number and check-in all lists if the number is the lowest then print the number and remove it from that list if a duplicate is found remove it from that list too. We will keep doing this until any list has any element and keep removing and printing.
The interviewer asked a follow-up question about the Time and Space complexity of your solution, I was not quite sure about it.

Round 3: Round 3 was a Zoom interview with 2 interviewers: Time of 60 minutes. Started with a formal introduction and then asked about my project architecture and business. I explained my project and boundary/limitations to handling concurrent calls. 
The interviewer asked, how to handle the call if you get more than your defined limits for your server, I explained how the Cloud environment takes care of Spikes in call demands. Scaling of the server can be done.
Then Interviewer asked, how to handle this situation with In-house architecture, I explained we can design our own filter/Interceptor which keeps track of each call and send an alert to create a new instance if the number of call reaches a defined point. First I was explaining to create a separate project and plug with API, but lastly, he wanted to listen, just create a class in the API project itself that will trigger an alert.

Next, he asked me a few questions:

  • How to handle concurrent calls, like 2 users updating the same records, after multiple solutions, the interview agreed that we can handle it with Apache Kafka, basically, he wants to listen to the Optimistic locking approach. 
  • Design a system, where the users could book vaccines based on the location and it should show the available vaccines to users, design everything including DB structure and API call flows.
  • We have millions of customers and our DB is updating constantly, tell me the approach where we can fetch and show available Vaccine from database which is 99.99% correct means reflect the DB value at that point of time. I couldn’t answer, not sure what he actually wanted, whether use some tools or approach.

I didn’t get offer.

Hope this will help you guys and all the best!!

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!