Today, I had my Phone Screen round for Compass on Karat platform.
The interview was for 60 min. In the first few minutes, the interviewer introduced himself and explained me the format of the interview.
- Introduction: 1 min
- Tech Questions: Interviewer gave me a set of 4 topics out of which I had to choose 2. The interviewer would ask me 3-4 questions on those 2 topics for the next 10 min.
- Coding: Next 45 min would be spent on the coding questions. If I was able to solve the 1st question within time, the interviewer would proceed to the next question.
Tech Topics
- Productions issues debugging
- Object Oriented Design
- Test cases and patterns
- Computer Fundamentals
I chose topic #1 and #2.
Questions under #1
- I was given a CPU and RAM usage graph of a process and was asked to debug if there's any issue and what that issue could be and how would I solve that. I observed that the CPU was constant but the RAM was increasing linearly. I told that there could be some memory leak in the process. It could be because of resource not closed properly and hence the GC was not able to clear them. I told that I would capture the heap dump to analyse further.
- There is a multi threaded application which is seeing that the threads are not sufficient. I was asked how would I debug this? I said that I would capture a thread dump to see if the threads are blocked on some operations or if there's a deadlock scenario.
- There's a service which is handle 1 RPS traffic. How would I find out if the service can handle 1000 RPS? I said that I would take a host which has the same specs of the hosts in production and use a load generating tool like jmeter and stress out the host to see the maximum requests it could handle per second with in the thresholds of CPU and RAM. I would take that number and multiple with the total number of hosts available in Prod to find out the scale in Prod.
Questions under #2
What is the difference between composition and inheritance. Can you state some usecase where you use them?
Coding Question #1
Given a list of words and a string, find the word whose anagram is present in the given string.
Example:
Words: ["cat", "baby", "bird", "fruit"]
String1: "tacjbcebef"
Answer: "cat"
String2: "bacdrigb"
Answer: "bird"
Coding Question #2
Given a grid of characters and a string, find the path of the string in the grid. You can only traverse to the right or bottom.
This was similar to word search problem on leetcode but slightly easier w.r.t traversal as its just 2 directions thus eliminating the case of reusing the characters. Also, we have to return the path instead of a boolean.
Overall
Overall the interview went well, the interviewer was very friendly and the karat code studio was good with auto fill-in and suggestions.