Round 1:
-
Given a list of words, group them by anagrams.
Input: List of "cat", "dog", "god"
Output: A Set of Sets of anagrams: {{'cat'}, {'dog', 'god'}}
-
Consider adding some additional tests in doTestsPass().
-
Implement the AnagramSolution.group() method correctly.
-
If time permits, try to improve your implementation.
dog -> dgo -> {dog}
god -> dgo -> {dog, god}
Round 2:
Question 1: You have a website and want to know the number of hits made in the last 5 seconds. Even if a user refreshes the page, it will be considered a new hit. Provide the approach for this.
Question 2: Web service:
- Cache: yes -> return (timeout is 1 second)
- Else go to API call: yes -> return (timeout 5 seconds)
- Else go to database: yes -> return (timeout 10 seconds)
- Default error
You have to implement a system where each module is used if it is up; otherwise, check with the next module. What design pattern would you follow?
Question 3: Difference between SOAP and REST.
Question 4: Have you used Microservices?
Question 5: Which framework did you use in REST? He was suggesting like Jersey webserver, Spring.
Round 3:
Question 1: How would you implement your own ThreadPool using JDK 1.4, similar to Executor in JDK 1.5?
Question 2: How would you convert a monolithic application like MakeMyTrip into Microservices?
Question 3: We have limited resources for the tasks, so are you ready to work in odd extended hours?