Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
In this round, the interviewer first asked me a preety basic coding question related to Backtracking. Then he switched to questions revolving around Java , Spring Boot and Kafka.



1. The input string may contain the same characters, so there will also be the same permutations.
2. The order of permutation does not matter.
Approach :
We can find all the permutations by Backtracking.
1) Fix a character then swap all the rest of the remaining character with a fixed character.
2) Then find all permutations for all remaining characters by the recursive call.
3) The base case for the recursion will be when there is only one character left unprocessed.
TC : O(N*N!), where N = length of the String.
SC : O(N)
Explain the use of final keyword in variable, method and class.
In Java, the final keyword is used as defining something as constant /final and represents the non-access modifier.
1) final variable :
i) When a variable is declared as final in Java, the value can’t be modified once it has been assigned.
ii) If any value has not been assigned to that variable, then it can be assigned only by the constructor of the class.
2) final method :
i) A method declared as final cannot be overridden by its children's classes.
ii) A constructor cannot be marked as final because whenever a class is inherited, the constructors are not inherited.
Hence, marking it final doesn't make sense. Java throws compilation error saying - modifier final not allowed here
3) final class :
i) No classes can be inherited from the class declared as final. But that final class can extend other classes for its
usage.
How would you differentiate between a String, StringBuffer, and a StringBuilder?
1) Storage area : In string, the String pool serves as the storage area. For StringBuilder and StringBuffer, heap
memory is the storage area.
2) Mutability : A String is immutable, whereas both the StringBuilder and StringBuffer are mutable.
3) Efficiency : It is quite slow to work with a String. However, StringBuilder is the fastest in performing operations. The
speed of a StringBuffer is more than a String and less than a StringBuilder. (For example appending a character is
fastest in StringBuilder and very slow in String because a new memory is required for the new String with appended
character.)
4) Thread-safe : In the case of a threaded environment, StringBuilder and StringBuffer are used whereas a String is
not used. However, StringBuilder is suitable for an environment with a single thread, and a StringBuffer is suitable for
multiple threads.
What is dependency Injection?
The process of injecting dependent bean objects into target bean objects is called dependency injection.
1) Setter Injection : The IOC container will inject the dependent bean object into the target bean object by calling the
setter method.
2) Constructor Injection : The IOC container will inject the dependent bean object into the target bean object by
calling the target bean constructor.
3) Field Injection : The IOC container will inject the dependent bean object into the target bean object by Reflection
API.
What is the root application context in Spring MVC? How is it loaded?
In Spring MVC, the context loaded using ContextLoaderListener is called the "root" application context which belongs
to the whole application while the one initialized using DispatcherServlet is actually specific to that servlet.
Technically, Spring MVC allows multiple DispatcherServlet in a Spring MVC web application and so multiple such
contexts each specific for respective servlet but having the same root context may exist.
What are the four core API architectures that Kafka uses?
Following are the four core APIs that Kafka uses :
1) Producer API : In Apache Kafka, the Producer API allows an application to publish a stream of records to one or more Kafka topics.
2) Consumer API : In Apache Kafka, the consumer API allows an application to subscribe to one or more Kafka topics. It also enables the application to process streams of records generated about such topics.
3) Streams API : In Apache Kafka, the Kafka Streams API allows an application to use a stream processing architecture to process data in Kafka. We can also use this application API to take input streams from one or more topics, process those using stream operations, and generate output streams to transmit to more topics. We can also use the Streams API to convert input streams into output streams.
4) Connect API : In Apache Kafka, the Kafka Connect API (also called Connector API) connects Kafka topics to applications. This API constructs and manages the operations of producers and consumers and establishing reusable links between these solutions. For example, A Connect API may capture all database updates and ensure they are made available in a Kafka topic.
What are the use cases of Kafka monitoring?
Following are the use cases of Apache Kafka monitoring :
1) Apache Kafka monitoring can keep track of system resources consumption such as memory, CPU, and disk utilization over time.
2) Apache Kafka monitoring is used to monitor threads and JVM usage. It relies on the Java garbage collector to free up memory, ensuring that it frequently runs, thereby guaranteeing that the Kafka cluster is more active.
3) It can be used to determine which applications are causing excessive demand, and identifying performance bottlenecks might help rapidly solve performance issues.
4) It always checks the broker, controller, and replication statistics to modify the partitions and replicas status if required.
This round primarily focused on questions related to Spring Boot and Hibernate. As I already had some projects in Java , I was familiar to both Spring and Hibernate - what are they used for , their basic understanding and all . So, this round also went preety well as I was able to answer most of the questions with little to no hints as far as possible.
How does Spring Boot works?
Spring Boot automatically configures your application based on the dependencies you have added to the project by using annotation. The entry point of the spring boot application is the class that contains @SpringBootApplication annotation and the main method.
Spring Boot automatically scans all the components included in the project by using @ComponentScan annotation.
What are the major differences between RequestMapping and GetMapping?
RequestMapping can be used with GET, POST, PUT, and many other request methods using the method attribute on the annotation. Whereas GetMapping is only an extension of RequestMapping, which helps you to improve clarity on requests.
Explain @RestController annotation in Sprint boot?
It is a combination of @Controller and @ResponseBody, used for creating a restful controller. It converts the response to JSON or XML. It ensures that data returned by each method will be written straight into the response body instead of returning a template.
What Are the Basic Annotations that Spring Boot Offers?
The primary annotations that Spring Boot offers reside in its "org.springframework.boot.autoconfigure" and its sub-packages. Here are a couple of basic ones:
@EnableAutoConfiguration – to make Spring Boot look for auto-configuration beans on its classpath and automatically apply them.
@SpringBootApplication – used to denote the main class of a Boot Application. This annotation combines @Configuration, @EnableAutoConfiguration, and @ComponentScan annotations with their default attributes.
How do you create an immutable class in hibernate?
Immutable class in hibernate creation could be in the following way. If we are using the XML form of configuration,
then a class can be made immutable by markingmutable=false. The default value is true there which indicating that
the class was not created by default.
In the case of using annotations, immutable classes in hibernate can also be created by using @Immutable
annotation.
What is hibernate caching?
Hibernate caching is the strategy for improving the application performance by pooling objects in the cache so that
the queries are executed faster. Hibernate caching is particularly useful when fetching the same data that is executed
multiple times. Rather than hitting the database, we can just access the data from the cache. This results in reduced
throughput time of the application.
Types of Hibernate Caching
First Level Cache :
1) This level is enabled by default.
2) The first level cache resides in the hibernate session object.
3) Since it belongs to the session object, the scope of the data stored here will not be available to the entire
application as an application can make use of multiple session objects.
Second Level Cache :
1) Second level cache resides in the SessionFactory object and due to this, the data is accessible by the entire
application.
2) This is not available by default. It has to be enabled explicitly.
3) EH (Easy Hibernate) Cache, Swarm Cache, OS Cache, JBoss Cache are some example cache providers.
Explain Query Cache
Hibernate framework provides an optional feature called cache region for the queries’ resultset. Additional configurations have to be done in code in order to enable this. The query cache is useful for those queries which are most frequently called with the same parameters. This increases the speed of the data retrieval and greatly improves performance for commonly repetitive queries.
This does not cache the state of actual entities in the result set but it only stores the identifier values and results of the value type. Hence, query cache should be always used in association with second-level cache.
This is a cultural fitment testing round. HR was very frank and asked standard questions. Then we discussed about my
role.
Why should we hire you ?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round,
like what are the projects currently the company is investing, which team you are mentoring. How all is the work
environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical
questions. No coding in most of the cases but some discussions over the design can surely happen.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the output of print(type("Python"))?