The structure of the interview I was told:
Round 1 (45 mins)
Focus Areas: DS, Algo , Problem Solving
Round 2 (45 mins)
Focus Areas: Design Pattern, HLD & LLD
I was only able to give Round 1 after which I did not qualify to Round 2, however, the interview did not follow the above structure.
Introduction and Project related high level questions based on resume
I described the projects in my resume and explained the use case of certain concepts mentioned like cron jobs and questions like what was the frequency of the scheduled task and why. No code related questions.
DSA Question:
Bag of Tokens from Leetcode - I started structuring my thought process in the form of a pseudo code directly which thankfully was sufficient for the interviewer. I had come up with O(n^2) complexity. I was brainstorming on optimizable when asked by interviewer, but interviewer said what I had was enough and we dont have time (15 mins approx).
Scenario based question - To test my knowledge of Design Patterns
Scenario: I have to send out email and sms notifications, how will u structure the code?
I created an interface NotificationSystem, created 2 classes for email and sms notification systems that implemented this interface with a standard method like sendOutNotification.
I then created a factory class which created the instances of the above email and sms classes based on criteria (string) provided by the driver class.
I coded out the structure. All was good. Except the interviewer asked if I can make the method in factory class as static. - Yes
Java and Spring Boot related questions