Mindtree interview experience Real time questions & tips from candidates to crack your interview

Senior Software Engineer

Mindtree
upvote
share-icon
3 rounds | 16 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithms, System Design, DBMS, Java, OOPS
Tip
Tip

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.

Application process
Where: Referral
Eligibility: Above 2 years of experience
Resume Tip
Resume tip

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.

Interview rounds

01
Round
Medium
Video Call
Duration60 Minutes
Interview date26 Aug 2021
Coding problem7

This round had 1 simple question related to Basic Programming and Maths and then I was asked some concepts
revolving around Java 8 , Spring Boot and OOPS.

1. Pascal's Triangle

Easy
20m average time
80% success
0/40
Asked in companies
IBMGrabTata Consultancy Services (TCS)

You are given an integer N. Your task is to return a 2-D ArrayList containing the pascal’s triangle till the row N.

A Pascal's triangle is a triangular array constructed by summing adjacent elements in preceding rows. Pascal's triangle contains the values of the binomial coefficient. For example in the figure below.

For example, given integer N= 4 then you have to print.

1  
1 1 
1 2 1 
1 3 3 1

Here for the third row, you will see that the second element is the summation of the above two-row elements i.e. 2=1+1, and similarly for row three 3 = 1+2 and 3 = 1+2.
Problem approach

Approach : This was a preety simple question so I was directly asked to code it using any of my preferred IDE.

Pascal’s triangle is a triangular array of the binomial coefficients.

//Pseudo Code
void PascalTriangle(int n)
{
for (int j = 1; j <= n; j++)
{
int C = 1;
for (int i = 1; i <= j; i++)
{
cout<< C<<" ";
C = C * (j - i) / i;
}
cout<<"\n";
}
}


TC : O(n^2)
SC : O(1)

Try solving now

2. OOPS Question

Difference between Abstract class and Interface.

Problem approach

The differences between Abstract Class and Interface are as follows:

Abstract Class:

1) Abstract classes have a default constructor and it is called whenever the concrete subclass is instantiated.
2) It contains Abstract methods as well as Non-Abstract methods.
3) The class which extends the Abstract class shouldn’t require the implementation of all the methods, only Abstract methods need to be implemented in the concrete sub-class.
4) Abstract class contains instance variables.

Interface:

1 )It doesn’t have any constructor and couldn’t be instantiated.
2) The abstract method alone should be declared.
3) Classes that implement the interface should provide the implementation for all the methods.
4) The interface contains only constants.

3. Java Question

What are some standard Java pre-defined functional interfaces?

Problem approach

Some of the famous pre-defined functional interfaces from previous Java versions are Runnable, Callable, Comparator, and Comparable. While Java 8 introduces functional interfaces like Supplier, Consumer, Predicate, etc. Please refer to the java.util.function doc for other predefined functional interfaces and its description introduced in Java 8.

Runnable : use to execute the instances of a class over another thread with no arguments and no return value. 

Callable : use to execute the instances of a class over another thread with no arguments and it either returns a value or throws an exception.

Comparator : use to sort different objects in a user-defined order.

Comparable : use to sort objects in the natural sort order.

4. Java Question

What are the main components of a Stream?

Problem approach

Components of the stream are:
1) A data source
2) Set of Intermediate Operations to process the data source
3) Single Terminal Operation that produces the result

5. Java Question

What are the advantages of using the Optional class?

Problem approach

It encapsulates optional values, i.e., null or not-null values, which helps in avoiding null checks, which results in better, readable, and robust code. It acts as a wrapper around the object and returns an object instead of a value, which can be used to avoid run-time NullPointerExceptions.

6. Java Question

What is the purpose of using @ComponentScan in the class files?

Problem approach

Spring Boot application scans all the beans and package declarations when the application initializes. You need to add the @ComponentScan annotation for your class file to scan your components added to your project.

7. Java Question

Explain @RestController annotation in Sprint boot?

Problem approach

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.

02
Round
Medium
Video Call
Duration50 Minutes
Interview date26 Aug 2021
Coding problem7

This round had questions revolving around Spring Framework , DBMS and some basic concepts of Java.

1. Java Question

How many bean scopes are supported by Spring?

Problem approach

The Spring Framework supports five scopes. They are:

1) Singleton : This provides scope for the bean definition to single instance per Spring IoC container.
2) Prototype : This provides scope for a single bean definition to have any number of object instances.
3) Request : This provides scope for a bean definition to an HTTP-request. 
4) Session : This provides scope for a bean definition to an HTTP-session. 
5) Global-session : This provides scope for a bean definition to an Global HTTP-session. 

The last three are available only if the users use a web-aware ApplicationContext.

2. Java Question

What do you understand by auto wiring and name the different modes of it?

Problem approach

The Spring container is able to autowire relationships between the collaborating beans. That is, it is possible to let Spring resolve collaborators for your bean automatically by inspecting the contents of the BeanFactory.
Different modes of bean auto-wiring are:

1) no : This is default setting which means no autowiring. Explicit bean reference should be used for wiring.

2) byName : It injects the object dependency according to name of the bean. It matches and wires its properties with the beans defined by the same names in the XML file.

3) byType : It injects the object dependency according to type. It matches and wires a property if its type matches with exactly one of the beans name in XML file.

4) constructor : It injects the dependency by calling the constructor of the class. It has a large number of parameters.

5) autodetect : First the container tries to wire using autowire by constructor, if it can’t then it tries to autowire by byType.

3. Java Question

Explain Spring Beans?

Problem approach

i) They are the objects that form the backbone of the user’s application.
ii) Beans are managed by the Spring IoC container.
iii) They are instantiated, configured, wired and managed by a Spring IoC container
iv) Beans are created with the configuration metadata that the users supply to the container.

4. DBMS Question

What is the difference between Cluster and Non-Cluster Index?

Problem approach

Clustered index is used for easy retrieval of data from the database by altering the way that the records are stored. Database sorts out rows by the column which is set to be clustered index.

A nonclustered index does not alter the way it was stored but creates a complete separate object within the table. It points back to the original table rows after searching.

5. DBMS Question

How to take a Backup of a Table in MySQL?

Problem approach

Answer :
Method 1 – Taking a Backup of a MySQL Table Using INSERT INTO

CREATE TABLE table_backup;
INSERT INTO table_backup SELECT * FROM table;

This method creates the structure of the table including indexes and then loading the data in via one statement.



Method 2 – Taking a Backup of a MySQL Table Using mysqldump

mysqldump -u{backup_user} -p{backup_password} from_db_name table_to_backup > backup_file.sql

The backup is taken using mysqldump and can be directed to a location of choice. Disk space is therefore not a consideration for the data drive, rather it is necessary just for the location being backed up to.

6. Java Question

What is the difference between JDK, JRE, and JVM?

Problem approach

Answer :

JVM : JVM is an acronym for Java Virtual Machine; it is an abstract machine which provides the runtime environment in which Java bytecode can be executed. It is a specification which specifies the working of Java Virtual Machine. Its implementation has been provided by Oracle and other companies. Its implementation is known as JRE.



JRE : JRE stands for Java Runtime Environment. It is the implementation of JVM. The Java Runtime Environment is a set of software tools which are used for developing Java applications. It is used to provide the runtime environment. It is the implementation of JVM. It physically exists. It contains a set of libraries + other files that JVM uses at runtime.



JDK : JDK is an acronym for Java Development Kit. It is a software development environment which is used to develop Java applications and applets. It physically exists. It contains JRE + development tools. JDK is an implementation of any one of the below given Java Platforms released by Oracle Corporation:
i) Standard Edition Java Platform
ii) Enterprise Edition Java Platform
iii) Micro Edition Java Platform

7. Java Question

What is JIT compiler?

Problem approach

Ans : Just-In-Time(JIT) compiler: It is used to improve the performance. JIT compiles parts of the bytecode that have similar functionality at the same time, and hence reduces the amount of time needed for compilation. Here the term “compiler” refers to a translator from the instruction set of a Java virtual machine (JVM) to the instruction set of a specific CPU.

03
Round
Easy
HR Round
Duration30 Minutes
Interview date26 Aug 2021
Coding problem2

This is a cultural fitment testing round .HR was very frank and asked standard questions. Then we discussed about my role.

1. Basic HR Question

Why are you looking for a job change?

Problem approach

Tip : For an experienced professional seeking a change, this is a common question. The easiest method to respond to this question is to state that you are leaving your current work in order to advance your career. Make sure you don't criticize or speak poorly about the company where you now work.

2. Basic HR Question

Why should we hire you ?

Problem approach

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

Skill covered: Programming

To make an AI less repetitive in a long paragraph, you should increase:

Choose another skill to practice
Similar interview experiences
company logo
Senior Software Engineer
3 rounds | 9 problems
Interviewed by Mindtree
1445 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 3 problems
Interviewed by Mindtree
1162 views
0 comments
0 upvotes
company logo
Senior Software Engineer
2 rounds | 5 problems
Interviewed by Mindtree
1466 views
0 comments
0 upvotes
company logo
System Engineer
2 rounds | 2 problems
Interviewed by Mindtree
852 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Senior Software Engineer
1 rounds | 3 problems
Interviewed by Intuit
2953 views
1 comments
0 upvotes
company logo
Senior Software Engineer
5 rounds | 5 problems
Interviewed by PhonePe
2547 views
0 comments
0 upvotes
company logo
Senior Software Engineer
4 rounds | 4 problems
Interviewed by Walmart
7445 views
1 comments
0 upvotes