Round 1 : DSA
I was asked problems around 0, 1 matrix .
- https://leetcode.com/problems/number-of-islands/description/
- https://leetcode.com/discuss/interview-question/535473/Facebook-or-Phone-or-Largest-Perimeter-Island
- https://leetcode.com/problems/sort-colors/description/
I was asked to code on and IDE and ran the test cases that the interviewer wanted me to run.
Round 2: LLD and HLD
I was asked to design a connection pool system. This system should be able to provided a connection from connection pool and the pool could be of any kind. Thread pool, db connection pool and so on.
I was fcosed on identifiying the api for the same and wanted to map out the classes on awhite board, but the inteviewer wanted to code it stratight away.
Personally I feel more comfortable in mapping out classes, interfaces and realtionships on a white board, but I guess here it went against me as the interviewer wanted to just go back to the IDE. May be just creating blank classes on the IDE and then figurng out the reltionships might have helped. (My learning here was pay attetnion to what the interviewer wants)
Then he gave me another question about writing a cache. I started out with this one but then the diection of the inteview went in direction of java and spring boot.
Following are the questions that were asked.
- Java multithreading, Threadable, Runnable, Callable, Futue and CompletableFuture.
- Solid principles
- If there is a cyclic dependency between two classes, which annotaion can be used to handle that.
- Write the code for singleton pattern. Explain double locking. Why is volatile used?
I was not selected after this round, probably because I did not code much when it came to LLD.
Hope it helps!

