MindTree Coding Questions and Answers 2022

Are you looking for Mindtree coding questions to prepare and practice for your job interview with a multinational company? 

We have listed down all the important coding questions asked in an interview with Mindtree, along with everything you need to know about the interview process with Mindtree.

Mindtree is a Bengaluru-based IT service and consulting company that was founded in the year 1999. The company has developed significantly to be now termed a multinational company. A job at Mindtree could be the right boost for your career and personal growth.

Read on to learn about the interview questions at Mindtree.

Coding test section

The coding test at Mindtree does not consist only of one round of questions. It is divided into three categories to test your coding knowledge rigorously. These sections will attack your knowledge of different coding subjects.

The three sections in the coding tests are as follows:

  • Implementation questions
  • DSA questions
  • Advanced algorithm questions.

You need to solve the entire test within 2 hours.

Now, let us discuss these sections in detail to help you understand them better.

Implementation Questions

The first section of the coding test includes implementation questions. These questions are designed to check your way of implementing your knowledge into the coding.

The questions in this section are usually easy to medium on the difficulty level. This section has 3 questions. Out of all the three sections, you should focus on spending the least amount of time in this section since it is the easiest and carries a weightage of only 50 marks.

DSA Questions

The next section in the Mindtree coding test is the DSA section. DSA stands for Data Structures and Algorithms. Questions in this section will test your knowledge of programming algorithms and data structures.

The questions asked in this section are medium to hard on the difficulty level. This section, too, has 3 questions, but the weightage for these three questions is 75 marks. Here you should focus on spending more time than the first section but less than the next one.

Advanced Algorithm Questions

The third and last section in the coding test at Mindtree is the advanced algorithms section. Questions in this section are designed to test your understanding of algorithms at an advanced level.

The questions in this section are hard on the difficulty scale. Unlike the other two sections, this section only has two questions, but it makes up about 45 percent of the total score. Time your test in such a way that this section gets at least 45 percent of the 2 hours assigned as your time limit. The weightage of this section is 100 marks.

MindTree Coding Questions and Answers

Now that you know about the structure of the coding test at Mindtree, we should discuss the questions asked in the test along with a guide to their answers. Most of these questions can be practiced for Google interview preparation. They are as follows:

Pattern codes

In these types of questions, the applicant is asked to write and print codes for patterns. For example:

  • Write a program to print 10 rows of stars
  • Write a program to print a pascal number triangle
  • Write a program to print a Floyd’s triangle
  • Write a program to print a diamond pattern
  • Write a program to print a right-angle triangle.


In these questions, you will be asked to find the Greatest Common Divider of the given numbers. For example, find a GCD of 16 and 40.

Loop questions

Here, you will be asked questions that will require you to use the loop functions in the program. The questions can be as follows:

  • Write a program to display the first 20 natural numbers.
  • Write a program to print the multiplications table of 34.
  • Write a program to print the first 12 even numbers and their sum.
  • Write a program to find the HCF of two numbers.

String Questions

Questions in this range will focus on the string of the program. Following are some examples:

  • Given a string, print the series without vowels.
  • Find the longest common prefix of two given strings.
  • From the given string, create a new string with the same character but in random order.
  • Check if the two given strings are anagrams of each other.
  • Convert a byte array into a string.

Other important questions

Following are some other important random questions based on the difficulty level. Let us begin. These questions can also be used for Google interview preparation


  • Find the LCM and HCF of the given numbers.
  • Print the Fibonacci series up to 25 places.
  • Check whether a given number [or numbers] are prime or not.
  • Check if a given number is automorphic.
  • Write a program to swap two numbers.
  • Write a program to find the sum of the given numbers.
  • Print prime numbers up to 15 places.
  • Print all the prime numbers below 10.


  • Write a code to reverse a number.
  • Convert a binary code to a decimal value.
  • Convert a decimal value to binary code.
  • Write a program to convert a binary code to octal.
  • Write a code to convert a decimal value to an octal.
  • Print all the Armstrong numbers between a given range.
  • Write a program to print all the prime numbers between 120 and 140.


  • Find the length of the longest substring that contains the highest distinct characters from a given integer ‘k’ and a string ‘s’.
  • Write a program for printing a palindrome pattern.
  • Write a program to remove all the vowels from a given string.
  • Find the frequency of the occurrence of a character in a string.
  • Write a program to find the roots of a given quadratic equation.
  • Write a code to find the largest palindrome in a given array.


That was all you needed to know about the Mindtree coding test. The questions asked in the test and their respective answers, and how to prepare and practice for the test. The coding test at Mindtree is divided into three sections which must be effectively analyzed to secure the job role. Therefore, be sure to implement the tips I have mentioned above to crack the interview process successfully. Good Luck!

Related Article:

4 Ways How to Find a Y-Intercept?


I am a Web Developer & SEO expert. I am working in an IT company since 5 years ago. I have years of experience in creating content for multiple websites.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button