Add office photos
LTIMindtree logo
Engaged Employer

LTIMindtree

Verified
3.8
based on 21k Reviews
Filter interviews by

1500+ LTIMindtree Interview Questions and Answers

Updated 28 Feb 2025
Popular Designations

Q1. Prime Numbers Identification

Given a positive integer N, your task is to identify all prime numbers less than or equal to N.

Explanation:

A prime number is a natural number greater than 1 that has no positive d...read more

Ans.

Identify all prime numbers less than or equal to a given positive integer N.

  • Iterate from 2 to N and check if each number is prime

  • Use the Sieve of Eratosthenes algorithm for efficient prime number identification

  • Optimize by only checking up to the square root of N for divisors

Add your answer
right arrow

Q2. there are 3 wheels. each can travel only 5kms. everytime you want to use the wheel to move forward, you have to use 2 of them. what is the maximum distance you can travel?

Ans.

Maximum distance that can be traveled using 3 wheels, each with a 5km limit and requiring 2 wheels to move forward.

  • Using all 3 wheels, we can move forward a total of 10kms (5kms using 2 wheels at a time)

  • After using the first 2 wheels to travel 5kms, we can switch to the remaining wheel and travel another 5kms

  • Alternatively, we can use 2 wheels to travel 5kms, then switch to the remaining wheel and use another 2 wheels to travel another 5kms, for a total of 10kms

View 1 answer
right arrow
LTIMindtree Interview Questions and Answers for Freshers
illustration image

Q3. 1) If you are given a card with 1-1000 numbers and there are 4 boxes. Card no 1 will go in box 1 , card 2 in box 2 and similarly it will go. Card 5 will again go in box 1. So what will be the logic for this cod...

read more
Ans.

Logic for distributing cards among 4 boxes in a circular manner.

  • Use modulo operator to distribute cards among boxes in a circular manner.

  • If card number is divisible by 4, assign it to box 4.

  • If card number is divisible by 3, assign it to box 3.

  • If card number is divisible by 2, assign it to box 2.

  • If card number is not divisible by any of the above, assign it to box 1.

View 3 more answers
right arrow

Q4. Sum of Squares of First N Natural Numbers Problem Statement

You are tasked with finding the sum of squares of the first N natural numbers for given test cases.

Input:

The first line contains an integer 'T', the...read more
Ans.

Calculate the sum of squares of the first N natural numbers for given test cases.

  • Read the number of test cases 'T'

  • For each test case, read the value of 'N'

  • Calculate the sum of squares of the first 'N' natural numbers

  • Output the result for each test case

View 2 more answers
right arrow
Discover LTIMindtree interview dos and don'ts from real experiences

Q5. Problem: Count Even or Odd in Array

Tanmay and Rohit are best buddies. Tanmay gives Rohit a challenge involving an array of N natural numbers. The task is to perform and answer a series of queries on the array ...read more

Ans.

Count the number of even or odd numbers in a range of an array based on given queries.

  • Create an array to store the input numbers.

  • Iterate through the queries and update or count even/odd numbers based on the query type.

  • Output the count of even or odd numbers for each query of type 1 or 2.

Add your answer
right arrow

Q6. Longest Harmonious Subsequence Problem Statement

Determine the longest harmonious subsequence within a given array of integers, where the difference between the maximum and minimum elements of the subsequence i...read more

Ans.

Find the longest harmonious subsequence in an array where the difference between max and min elements is 1.

  • Iterate through the array and count the frequency of each element.

  • For each element, check if the count of element+1 is greater than 0, if so, update the length of the harmonious subsequence.

  • Return the maximum length found.

Add your answer
right arrow
Are these interview questions helpful?
Q7. What is normalization and what are the different forms of normalization?
Ans.

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • Normalization is used to eliminate data redundancy and ensure data integrity.

  • There are different forms of normalization such as First Normal Form (1NF), Second Normal Form (2NF), Third Normal Form (3NF), and Boyce-Codd Normal Form (BCNF).

  • Each form of normalization has specific rules to follow in order to achieve a well-structured database.

  • For example, in First Normal ...read more

View 1 answer
right arrow

Q8. Reverse a String Problem Statement

Given a string STR containing characters from [a-z], [A-Z], [0-9], and special characters, determine the reverse of the string.

Input:

The input starts with a single integer '...read more
Ans.

Reverse a given string containing characters from [a-z], [A-Z], [0-9], and special characters.

  • Iterate through the characters of the string from end to start and append them to a new string to get the reversed string.

  • Use built-in functions like reverse() or StringBuilder in languages like Python or Java for efficient reversal.

  • Ensure to handle special characters and numbers while reversing the string.

  • Consider edge cases like empty string or strings with only one character.

View 1 answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. Which coding language are you comfortable with?

Ans.

I am comfortable with multiple coding languages including Java, Python, and C++.

  • Proficient in Java, Python, and C++

  • Experience with web development languages such as HTML, CSS, and JavaScript

  • Familiarity with scripting languages like Bash and PowerShell

  • Comfortable with SQL and NoSQL databases

  • Knowledge of machine learning libraries like TensorFlow and Keras

View 2 more answers
right arrow

Q10. Valid Parentheses Problem Statement

Given a string 'STR' consisting solely of the characters “{”, “}”, “(”, “)”, “[” and “]”, determine if the parentheses are balanced.

Input:

The first line contains an integer...read more
Ans.

Check if given strings containing parentheses are balanced or not.

  • Use a stack to keep track of opening parentheses

  • Iterate through the string and push opening parentheses onto the stack

  • When a closing parentheses is encountered, pop from the stack and check if it matches the corresponding opening parentheses

  • If stack is empty at the end and all parentheses are matched, the string is balanced

Add your answer
right arrow

Q11. 1.data dictionary concept-table creation steps How do you maintain TMG? What is one step and two step? Where do you use the search help and types of search help? What are lock objects? Difference between struct...

read more
Ans.

Questions related to SAP ABAP concepts and terminology.

  • Data dictionary concept and table creation steps

  • TMG maintenance

  • One step and two step

  • Search help and types of search help

  • Lock objects

  • Difference between structure and table

  • Views and types of views

Add your answer
right arrow

Q12. 5.enhancements What is enhancements? Types of enhancements? How do you find an exit? Difference between classic badi and kernel badi? Difference between customer exit and user exit? Types of customer exit? Type...

read more
Ans.

Enhancements are ways to modify SAP standard functionality. There are various types of enhancements and exits available.

  • Enhancements are used to modify SAP standard functionality without changing the original code

  • Types of enhancements include user exits, customer exits, BAdIs, enhancement spots, and enhancement frameworks

  • Exits are identified by searching for function modules with names containing 'EXIT_' or 'SMOD_'

  • Classic BAdIs are implemented using function modules, while ke...read more

Add your answer
right arrow

Q13. Change Start Node Problem Statement

You are provided with a singly linked list and an integer K. The objective is to make the Kth node from the end of the linked list the starting node of the linked list.

Input...read more

Ans.

Given a singly linked list and an integer K, rearrange the list such that the Kth node from the end becomes the starting node.

  • Traverse the linked list to find the length and the Kth node from the end.

  • Update the pointers to rearrange the list accordingly.

  • Handle edge cases like K being equal to 1 or the length of the list.

Add your answer
right arrow

Q14. Chocolate Distribution Problem

You are given an array/list CHOCOLATES of size 'N', where each element represents the number of chocolates in a packet. Your task is to distribute these chocolates among 'M' stude...read more

Ans.

Distribute chocolates among students to minimize the difference between the largest and smallest number of chocolates.

  • Sort the array of chocolates in ascending order.

  • Iterate through the array and find the minimum difference between the elements by considering 'M' elements at a time.

  • Return the minimum difference found as the result.

Add your answer
right arrow

Q15. Flip The Bits Problem Statement

Given a binary string S of length N where initially all characters are '1', perform exactly M operations, choosing from four specific operations, and determine how many distinct ...read more

Ans.

Count the number of distinct final strings possible after performing a given number of operations on a binary string.

  • Iterate through all possible combinations of operations to determine the final string after each operation.

  • Use bitwise operations to efficiently flip the bits based on the chosen operation.

  • Keep track of distinct final strings using a set data structure.

  • Return the size of the set as the number of distinct final strings.

Add your answer
right arrow

Q16. Next Greater Element Problem Statement

Given a list of integers of size N, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X is the first elem...read more

Ans.

Find the Next Greater Element for each element in a list of integers.

  • Iterate through the list of integers from right to left.

  • Use a stack to keep track of elements for which the Next Greater Element is not yet found.

  • Pop elements from the stack until a greater element is found or the stack is empty.

  • Assign the Next Greater Element as the top element of the stack or -1 if the stack is empty.

Add your answer
right arrow

Q17. Do you know about sorting algorithms? What are the types of sorting algorithms? Write them,

Ans.

Sorting algorithms are used to arrange data in a specific order. There are various types of sorting algorithms.

  • Types of sorting algorithms include: bubble sort, selection sort, insertion sort, merge sort, quick sort, heap sort, counting sort, radix sort, and bucket sort.

  • Bubble sort compares adjacent elements and swaps them if they are in the wrong order.

  • Selection sort selects the smallest element and swaps it with the first element, then selects the second smallest and swaps ...read more

View 1 answer
right arrow

Q18. Alien Dictionary Problem Statement

You are provided with a sorted dictionary (by lexical order) in an alien language. Your task is to determine the character order of the alien language from this dictionary. Th...read more

Ans.

Given a sorted alien dictionary in an array of strings, determine the character order of the alien language.

  • Iterate through the dictionary to build a graph of character dependencies based on adjacent words.

  • Perform a topological sort on the graph to determine the character order.

  • Return the character array representing the order of characters in the alien language.

Add your answer
right arrow

Q19. 6.sap script and smart form? Types of window in sap script and smart form Is script is client dependent or independent? Difference between script and smart form? Tell me the tcodes used for smart forms and scri...

read more
Ans.

Questions related to SAP ABAP scripting and smart forms.

  • SAP Script and Smart Forms are used for creating and printing forms in SAP systems.

  • SAP Script has client dependency while Smart Forms are client independent.

  • SAP Script uses function modules like OPEN_FORM, WRITE_FORM, and CLOSE_FORM.

  • Smart Forms use function modules like SMARTFORM_FILL_OUT, SMARTFORM_GET_SMARTFORMS_LIST, and SMARTFORM_GET_PRINT_PDFS.

  • SAP Script has fewer features compared to Smart Forms.

  • SAP Script has wind...read more

Add your answer
right arrow

Q20. Your introduction? What are oops concept? What is inheritance? What is difference between c and c++? Write a code to print sum of all prime no. Between 1to100? What is primary key and foreign key? Difference be...

read more
Ans.

Answers to questions asked in a Graduate Engineer Trainee interview

  • OOPs concepts include encapsulation, inheritance, polymorphism, and abstraction

  • Inheritance is a mechanism where a new class is derived from an existing class

  • C++ is an object-oriented programming language while C is a procedural programming language

  • Code to print sum of prime numbers between 1 to 100: [code snippet]

  • Primary key is a unique identifier for a record in a table while foreign key is a field in a table...read more

Add your answer
right arrow

Q21. Matrix Multiplication Task

Given two sparse matrices MAT1 and MAT2 of integers with dimensions 'N' x 'M' and 'M' x 'P' respectively, the goal is to determine the resulting matrix produced by their multiplicatio...read more

Ans.

Implement a function to multiply two sparse matrices and return the resulting matrix.

  • Create a function that takes two sparse matrices as input and returns the resulting matrix after multiplication

  • Iterate through the non-zero elements of the matrices to perform the multiplication efficiently

  • Handle the edge cases such as empty matrices or matrices with all zero elements

  • Ensure the dimensions of the matrices are compatible for multiplication

Add your answer
right arrow

Q22. Reverse the String Problem Statement

You are given a string STR which contains alphabets, numbers, and special characters. Your task is to reverse the string.

Example:

Input:
STR = "abcde"
Output:
"edcba"

Input...read more

Ans.

Reverse a given string containing alphabets, numbers, and special characters.

  • Iterate through the string from the end to the beginning and append each character to a new string.

  • Use built-in functions like reverse() or slicing to reverse the string.

  • Handle special characters and numbers while reversing the string.

  • Ensure to consider the constraints provided in the problem statement.

  • Implement a function that takes a string as input and returns the reversed string.

Add your answer
right arrow

Q23. Explain any terraform project that I did recently also what were the variables you defined in terraform configuration, how will you access a storage account blob container from more than one subscriptions from...

read more
Ans.

Explaining recent Terraform project, accessing storage account blob container from multiple subscriptions, Azure DevOps variable group and pipeline, and brief on Ansible role.

  • Recently worked on Terraform project to provision Azure resources

  • Defined variables in Terraform configuration for resource names and sizes

  • Accessed storage account blob container from multiple subscriptions using shared access signature (SAS) tokens

  • Current project infrastructure in Azure includes virtual ...read more

Add your answer
right arrow

Q24. Candies Distribution Problem Statement

Prateek is a kindergarten teacher with a mission to distribute candies to students based on their performance. Each student must get at least one candy, and if two student...read more

Ans.

The task is to determine the minimum number of candies a teacher needs to distribute to students based on their performance ratings.

  • Iterate through the array of student ratings to determine the minimum number of candies needed for each student.

  • Consider the ratings of adjacent students to decide the distribution of candies.

  • Keep track of the total number of candies needed to fulfill the distribution criteria.

  • Implement a function to calculate the minimum number of candies requir...read more

Add your answer
right arrow

Q25. 2.Reports: Events in classical reports and explain? Events in interactive reports? Difference between at pf status and user command? Tell me the function module you last used in your report? How do you debug th...

read more
Ans.

Questions related to SAP Abap reports and debugging

  • Events in classical reports are start-of-selection, end-of-selection, and top-of-page. In interactive reports, events are at-line-selection, at-user-command, and top-of-page.

  • AT PF status is used to define the status of the screen, while user command is used to define the actions that can be performed on the screen.

  • The function module used in a report depends on the requirement. For example, if we need to convert a date from o...read more

Add your answer
right arrow

Q26. Inplace Rotate Matrix 90 Degrees Anti-Clockwise

You are provided with a square matrix of non-negative integers of size 'N x N'. The task is to rotate this matrix by 90 degrees in an anti-clockwise direction wit...read more

Ans.

Rotate a square matrix by 90 degrees anti-clockwise without using extra space.

  • Iterate through each layer of the matrix from outer to inner layers

  • Swap elements in groups of 4 to rotate them in place

  • Handle odd-sized matrices separately by adjusting the loop boundaries

Add your answer
right arrow

Q27. in Angular what is services and how to call service api, and how bind our data with in component.

Ans.

Services in Angular are singleton objects that provide functionality to components. They can be called using dependency injection.

  • Services are used to share data and functionality across multiple components

  • They can be created using the 'ng generate service' command

  • Services can be injected into components using the constructor

  • To call a service API, use Angular's HttpClient module

  • Data can be bound to components using property binding or two-way binding

Add your answer
right arrow
Q28. What is the difference between a List and an Array in Python?
Ans.

A List is a dynamic array that can store elements of different data types, while an Array is a fixed-size collection of elements of the same data type.

  • Lists can grow or shrink in size dynamically, while Arrays have a fixed size.

  • Lists can store elements of different data types, while Arrays can only store elements of the same data type.

  • Lists are more flexible and versatile compared to Arrays.

  • Example: list_example = [1, 'hello', True]

  • Example: array_example = [1, 2, 3, 4, 5]

Add your answer
right arrow

Q29. How will you write a program to . For example, create a calculator

Ans.

To create a calculator program, use a GUI framework and implement basic arithmetic operations.

  • Choose a programming language and a GUI framework such as JavaFX or Tkinter.

  • Implement the basic arithmetic operations such as addition, subtraction, multiplication, and division.

  • Add functionality for decimal points, clear button, and negative numbers.

  • Test the program thoroughly to ensure accuracy and usability.

Add your answer
right arrow

Q30. What is the difference between Array and LinkedList? What are binary search, code, and complexities? What is a deadlock? What is OOPS? Pillars of OOPS(Encapsulation, Inheritance, Abstraction, Polymorphism), wit...

read more
Ans.

Interview questions for Software Engineer position

  • Array is a collection of elements of the same data type, while LinkedList is a collection of nodes that contain data and a reference to the next node

  • Binary search is a search algorithm that divides the search interval in half at every step, reducing the search space by half

  • Code complexity refers to the level of difficulty in understanding and maintaining a piece of code

  • Deadlock is a situation where two or more processes are un...read more

Add your answer
right arrow

Q31. Prime Numbers Problem Statement

Given a positive integer N, your task is to determine and return all prime numbers less than or equal to N.

Input:

N = 10

Output:

2 3 5 7

Example:

Input:
N = 20
Output:
2 3 5 7 1...read more
Ans.

Implement a function to return all prime numbers less than or equal to a given positive integer N.

  • Create a function that takes a positive integer N as input

  • Iterate from 2 to N and check if each number is prime

  • Use a helper function to determine if a number is prime

  • Return an array of all prime numbers less than or equal to N

Add your answer
right arrow

Q32. eliminate repeated array from the given string

Ans.

To eliminate repeated array from a given string

  • Convert the string to an array using split() method

  • Use Set object to remove duplicates from the array

  • Convert the array back to string using join() method

View 1 answer
right arrow

Q33. 1. Difference between calculate and filter function. 2. What is pivot and unpivot table in power bi? 3. Optimization techniques in power bi. 4. Types of gateways in power bi. 5. Difference between star and snow...

read more
Ans.

Questions related to Power BI

  • Calculate function is used to create new columns based on a formula while filter function is used to filter data based on a condition.

  • Pivot table is used to summarize and aggregate data while unpivot table is used to transform data from wide to long format.

  • Optimization techniques include reducing data model size, using calculated columns instead of measures, and minimizing data refresh frequency.

  • Types of gateways include personal, on-premises, and...read more

Add your answer
right arrow

Q34. What should be done when a defect is found in production?

Ans.

Defects found in production should be immediately reported and a plan should be made to fix the issue.

  • Report the defect to the development team and stakeholders

  • Analyze the impact of the defect on the system and users

  • Prioritize the defect based on severity and impact

  • Create a plan to fix the defect and test the fix thoroughly

  • Deploy the fix to production after testing

  • Monitor the system to ensure the defect has been resolved

View 2 more answers
right arrow

Q35. 1. diff b/w findelements vs findelement? 2. set vs map? 3. wap for occurences of characters 4. wap for fibonacci series 5. write xpath from a website(they will tell the exact location) 6. How to get galues from...

read more
Ans.

Answers to various technical questions related to automation testing and software development.

  • findElements vs findElement: findElements returns a list of web elements matching the locator, while findElement returns the first web element matching the locator.

  • Set vs Map: Set is a collection of unique elements, while Map is a collection of key-value pairs.

  • Program for occurrences of characters: Write a program to count the occurrences of each character in a given string.

  • Program f...read more

View 3 more answers
right arrow

Q36. 1. Difference between sum and sumx function in power bi. 2. What is X Velocity in power BI ? 3. Types of filters in power bi. 4. Types of connection mode in power bi.

Ans.

Answers to Power BI related questions.

  • sum function adds up the values in a column, while sumx function adds up the result of an expression evaluated for each row in a table

  • X Velocity is a feature in Power BI that allows for faster data processing and analysis

  • Types of filters in Power BI include visual level filters, page level filters, and report level filters

  • Types of connection mode in Power BI include Import, DirectQuery, and Live Connection

Add your answer
right arrow

Q37. Nth Fibonacci Number Problem Statement

Calculate the Nth term in the Fibonacci sequence, where the sequence is defined as follows: F(n) = F(n-1) + F(n-2), with initial conditions F(1) = F(2) = 1.

Input:

The inp...read more
Ans.

Calculate the Nth Fibonacci number efficiently using dynamic programming.

  • Use dynamic programming to store previously calculated Fibonacci numbers to avoid redundant calculations.

  • Start with base cases F(1) and F(2) as 1, then iteratively calculate F(n) using F(n-1) and F(n-2).

  • Ensure the input N is within the constraints 1 <= N <= 10000.

  • Example: For N = 5, the 5th Fibonacci number is 5 (1, 1, 2, 3, 5).

Add your answer
right arrow

Q38. Explain microservice architecture and how do we implement that using spring boot

Ans.

Microservice architecture is a design approach where an application is composed of small, independent services that communicate over well-defined APIs.

  • Break down the application into smaller, loosely coupled services that can be developed, deployed, and scaled independently.

  • Each service focuses on a specific business capability and communicates with other services through APIs.

  • Spring Boot provides a convenient framework for building microservices by offering features like emb...read more

Add your answer
right arrow

Q39. What are a concurrent hashmap and its advantage over a normal hashmap?

Ans.

Concurrent hashmap allows multiple threads to access and modify the map concurrently without causing data inconsistency.

  • Concurrent hashmap is thread-safe and allows multiple threads to access and modify the map concurrently.

  • It uses a technique called lock striping to divide the map into segments and apply locks to each segment instead of the entire map.

  • This allows multiple threads to access different segments of the map concurrently without causing data inconsistency.

  • Concurre...read more

Add your answer
right arrow

Q40. 1. Introduce yourself 2. Predict the output for a program that would throw DivideByZeroException 3. Write a program to find factorial 4. Write a program: "Welcome To Mindtree" to "Mindtree To Welcome" 5. Compon...

read more
Ans.

The interview questions cover topics like introducing oneself, predicting program output, writing programs, Selenium components, Cucumber, and API encryption.

  • Introduce yourself confidently, highlighting relevant experience and skills.

  • To predict the output of a program that throws DivideByZeroException, understand how the exception is handled in the code.

  • Write a program to find factorial using loops or recursion.

  • To reverse the words in a string, split the string into words, re...read more

View 1 answer
right arrow

Q41. What is the method to swap two numbers without using any third variable?

Ans.

To swap two numbers without using a third variable, use arithmetic operations like addition and subtraction.

  • Add the two numbers and store the result in one of the variables.

  • Subtract the second number from the sum and store the result in the second variable.

  • Finally, subtract the first number (which is now stored in the second variable) from the sum and store the result in the first variable.

Add your answer
right arrow
Q42. What are dunder methods in Python?
Ans.

Dunder methods in Python are special methods with double underscores at the beginning and end of their names, used for operator overloading and other built-in functionalities.

  • Dunder methods are also known as magic methods or special methods.

  • They are used to emulate behavior of built-in Python functions or operators.

  • Examples include __init__ for object initialization, __add__ for addition, and __str__ for string representation.

Add your answer
right arrow

Q43. Write a Program to print the following pattern: * * * * * * * * * * * * * * *

Ans.

Program to print a pattern of stars in a pyramid shape

  • Use nested loops to print the pattern

  • The outer loop controls the number of rows

  • The inner loop controls the number of stars in each row

View 1 answer
right arrow

Q44. 3.module pool programming Events in module pool ? Difference between process before output and process after input? What is the default screen number?

Ans.

Module pool programming events, process before output and process after input, default screen number.

  • Events in module pool include initialization, start-of-selection, end-of-selection, and others.

  • Process before output is used to modify screen elements before they are displayed, while process after input is used to validate user input.

  • The default screen number is 1000.

Add your answer
right arrow

Q45. if you change the infrasrtuctur in aws management console will it change statefile

Ans.

Yes, changing infrastructure in AWS management console will change statefile.

  • Any changes made in the AWS management console will be reflected in the statefile.

  • The statefile is a record of the current state of the infrastructure.

  • For example, if you add a new EC2 instance in the management console, it will be reflected in the statefile.

View 2 more answers
right arrow

Q46. How do you performed incrimental load in your project?

Ans.

Incremental load is performed by identifying new data and adding it to the existing data set.

  • Identify new data based on a timestamp or unique identifier

  • Extract new data from source system

  • Transform and map new data to match existing data set

  • Load new data into target system

  • Verify data integrity and consistency

Add your answer
right arrow
Q47. How do you create a Context Manager in Python?
Ans.

A Context Manager in Python is created using the 'with' statement and defining __enter__ and __exit__ methods.

  • Use the 'with' statement to create a block of code where the context manager will be used.

  • Define a class with __enter__ method to set up the context and return any resource that needs to be managed.

  • Define a class with __exit__ method to clean up the context and release any resources.

  • Example: ```python class MyContextManager: def __enter__(self): print('Entering the co...read more

Add your answer
right arrow

Q48. Tell me about yourseld About projects What is sorting Insertion sort code What is searching Binary and linear search code About projects Oops concept ( polymorphism, enacpsulation).

Ans.

Interview questions on software engineering concepts and projects

  • Discussed my background and experience

  • Explained my projects and their significance

  • Defined sorting and provided insertion sort code

  • Explained searching and provided binary and linear search code

  • Discussed OOP concepts such as polymorphism and encapsulation

Add your answer
right arrow

Q49. What is the process for managing hotfix changes in a production environment?

Ans.

Hotfix changes in a production environment are managed through a controlled process to minimize risks and ensure smooth deployment.

  • Hotfix changes should be thoroughly tested in a staging environment before being deployed to production.

  • A rollback plan should be in place in case the hotfix introduces new issues.

  • Communication with stakeholders and users about the hotfix deployment is crucial to manage expectations and minimize disruptions.

  • Version control systems should be used t...read more

Add your answer
right arrow

Q50. What is meant by regression and retesting?

Ans.

Regression is testing to ensure changes do not affect existing functionality. Retesting is testing to ensure defects have been fixed.

  • Regression testing is done to ensure that changes made to the software do not affect the existing functionality.

  • Retesting is done to ensure that defects found during testing have been fixed.

  • Regression testing is done after every change to the software.

  • Retesting is done after a defect has been fixed.

  • Regression testing is automated to save time an...read more

Add your answer
right arrow

Q51. 7.Idoc Steps to create an idoc? Steps to reprocess the idoc? How do you debug the idoc?

Ans.

Steps to create, reprocess and debug an IDoc in SAP ABAP.

  • To create an IDoc, define the message type, basic type, and segment structure in WE31.

  • Create a function module to populate the IDoc data and trigger the IDoc creation using WE19.

  • To reprocess an IDoc, use transaction BD87 and select the IDoc to be reprocessed.

  • Check the error message and correct the issue before reprocessing the IDoc.

  • To debug an IDoc, set a breakpoint in the function module used to create the IDoc.

  • Use tra...read more

Add your answer
right arrow

Q52. Explain Python Data Structures and advantages and some differences in each

Ans.

Python data structures are containers that hold data in an organized manner, each with its own advantages and differences.

  • Python lists are versatile and can hold different data types.

  • Tuples are immutable and can be used as keys in dictionaries.

  • Sets are unordered and eliminate duplicate elements.

  • Dictionaries store data in key-value pairs for efficient retrieval.

View 1 answer
right arrow
Q53. What are the different types of joins in SQL?
Ans.

Different types of joins in SQL include inner join, left join, right join, and full outer join.

  • Inner join: Returns rows when there is at least one match in both tables.

  • Left join: Returns all rows from the left table and the matched rows from the right table.

  • Right join: Returns all rows from the right table and the matched rows from the left table.

  • Full outer join: Returns rows when there is a match in one of the tables.

Add your answer
right arrow

Q54. What is the difference between order by and group by in sql Why we use oops Scenario based question -3

Ans.

Order by sorts the result set while group by groups the result set based on a column

  • Order by is used to sort the result set in ascending or descending order

  • Group by is used to group the result set based on a column

  • Order by can be used with multiple columns while group by can only be used with one column

  • Order by is used after the select statement while group by is used before the select statement

Add your answer
right arrow

Q55. What is Difference between anotation and decorators

Ans.

Annotations are used in Java while decorators are used in Python.

  • Annotations are used to provide metadata to the code and can be accessed at runtime.

  • Decorators are used to modify the behavior of a function or class.

  • Annotations are declared using the @ symbol in Java while decorators use the @ symbol in Python.

  • Annotations are part of the language syntax in Java while decorators are implemented using functions in Python.

Add your answer
right arrow

Q56. What programming languages are you comfortable in ?

Ans.

I am comfortable in programming languages such as Java, Python, and JavaScript.

  • Java

  • Python

  • JavaScript

Add your answer
right arrow

Q57. Explain your project and which algorithm you used in it. Why that algorithm?

Ans.

I worked on a project that involved sentiment analysis of customer reviews using Naive Bayes algorithm.

  • The project involved collecting customer reviews from various sources.

  • Preprocessing the data by removing stop words, stemming, and tokenizing.

  • Used Naive Bayes algorithm for sentiment analysis.

  • The algorithm was chosen because of its simplicity and effectiveness in text classification tasks.

  • The accuracy of the model was evaluated using cross-validation techniques.

Add your answer
right arrow

Q58. what are Terraform workspaces, what is a null resource in terraform, what is git fetch and how it's different from git pull, What is a load balancer in azure, what is an application gateway in azure, what are p...

read more
Ans.

Questions related to Azure DevOps Engineer role

  • Terraform workspaces are used to manage multiple environments with the same codebase

  • Null resource in Terraform is used to execute arbitrary code that doesn't create any resources

  • Git fetch downloads changes from the remote repository but doesn't merge them with the local branch

  • Load balancer in Azure distributes incoming traffic across multiple virtual machines

  • Application gateway in Azure is a web traffic load balancer that can als...read more

Add your answer
right arrow

Q59. Can we write int func() and int func(int a) in a single class?

Ans.

Yes, we can write int func() and int func(int a) in a single class.

  • We can overload the function with different parameters.

  • The function with no parameter is called default constructor.

  • Example: class MyClass { int func(); int func(int a); };

  • Both functions can have different implementations.

Add your answer
right arrow

Q60. What is Functional interface and way of implementing it

Ans.

Functional interface is an interface with only one abstract method, can be implemented using lambda expressions.

  • Functional interface has only one abstract method

  • Can be implemented using lambda expressions

  • Used in Java to achieve functional programming

Add your answer
right arrow
Q61. What is the difference between static and final in Java?
Ans.

Static is used to define class-level variables and methods, while final is used to define constants that cannot be changed.

  • Static variables belong to the class itself, while final variables are constants that cannot be modified.

  • Static methods can be called without creating an instance of the class, while final methods cannot be overridden.

  • Static keyword is used for memory management, while final keyword is used for defining constants.

  • Example: static int count = 0; final doubl...read more

Add your answer
right arrow

Q62. How can we expose an Rest API using spring boot?

Ans.

Spring Boot can be used to expose Rest APIs easily.

  • Create a Spring Boot project with necessary dependencies.

  • Define the API endpoints using @RestController and @RequestMapping annotations.

  • Implement the API logic in methods annotated with @GetMapping, @PostMapping, etc.

  • Use @RequestBody and @PathVariable annotations to handle request data.

  • Configure the API using application.properties or application.yml file.

  • Test the API using tools like Postman or Swagger UI.

Add your answer
right arrow

Q63. What is the request filter for API requests and how is it configured to utilise different forms of authentication?

Ans.

Request filter for API requests is a mechanism to intercept and process incoming requests before they reach the intended endpoint.

  • Request filters can be implemented using frameworks like Spring Security in Java.

  • They can be configured to support different forms of authentication such as basic authentication, OAuth, JWT, etc.

  • Authentication mechanisms can be specified in the filter configuration to validate incoming requests before processing.

Add your answer
right arrow

Q64. What are the methods to scale up a Kubernetes cluster?

Ans.

Methods to scale up a Kubernetes cluster include horizontal scaling, vertical scaling, and cluster auto-scaling.

  • Horizontal scaling: Adding more nodes to the cluster to distribute the workload.

  • Vertical scaling: Increasing the resources (CPU, memory) of existing nodes in the cluster.

  • Cluster auto-scaling: Automatically adjusting the number of nodes based on resource usage.

  • Using tools like Horizontal Pod Autoscaler (HPA) to automatically scale the number of pods in a deployment b...read more

Add your answer
right arrow

Q65. you're well versed with C programming? write a code for addition and multiplication of matrix

Ans.

Code for addition and multiplication of matrix in C programming.

  • Use nested loops to iterate through each element of the matrix

  • For addition, add corresponding elements of both matrices and store in a new matrix

  • For multiplication, use dot product of rows and columns to calculate each element of the new matrix

Add your answer
right arrow
Q66. What are generators and decorators in Python?
Ans.

Generators and decorators are advanced features in Python used for creating iterators and modifying functions respectively.

  • Generators are functions that can be paused and resumed, allowing for efficient iteration over large datasets without loading everything into memory at once.

  • Decorators are functions that modify the behavior of other functions. They are denoted by the @ symbol and are commonly used for logging, authentication, and memoization.

  • Example of a generator: def my...read more

Add your answer
right arrow

Q67. Explain BDD concepts a) What is dryRun ? b) What is hooks? c) Where does the execution start at a BDD framework ? (Ans: TestRunner file) d) What is a glue ? e) Difference between Scenario Outline and Scenario C...

read more
Add your answer
right arrow

Q68. How do you configure and verify custom DNS in Azure AD?

Ans.

To configure and verify custom DNS in Azure AD, follow these steps:

  • Create a DNS zone in Azure DNS

  • Add a custom domain to Azure AD

  • Create a CNAME record in the DNS zone that points to the Azure AD domain

  • Verify the custom domain in Azure AD

  • Update the DNS registrar to use the Azure DNS name servers

  • Test the custom DNS by accessing Azure AD resources using the custom domain

Add your answer
right arrow

Q69. 1. Which programming language you are comfortable with?

Ans.

I am comfortable with Java programming language.

  • Proficient in object-oriented programming concepts

  • Experience in developing web applications using Spring framework

  • Familiarity with Java libraries and tools such as Hibernate and Maven

View 1 answer
right arrow

Q70. How do you know about this type of ID related issues because you are not completed it with your degree but you know everything how to learn it and how to based IT

Ans.

I have gained knowledge and skills in ID related issues through self-learning and practical experience.

  • I have a strong passion for technology and have actively pursued learning about ID related issues outside of my degree.

  • I have taken online courses, attended workshops, and participated in hands-on projects to enhance my knowledge in this area.

  • I have also sought guidance from experienced professionals and engaged in self-study to stay updated with the latest developments.

  • I ha...read more

View 1 answer
right arrow
Q71. What is the difference between ArrayList and HashMap in Java?
Ans.

ArrayList is a dynamic array that can grow or shrink in size, while HashMap is a key-value pair collection where each element is accessed by a key.

  • ArrayList stores elements in an ordered sequence and allows duplicate values.

  • HashMap stores key-value pairs and does not allow duplicate keys.

  • Example: ArrayList<String> list = new ArrayList<>(); HashMap<String, Integer> map = new HashMap<>();

Add your answer
right arrow

Q72. How do you open command prompt in Windows ?

Ans.

To open command prompt in Windows, press Win+R and type 'cmd' or search for 'Command Prompt' in Start menu.

  • Press Win+R and type 'cmd'

  • Search for 'Command Prompt' in Start menu

  • Right-click on Start menu and select 'Command Prompt'

  • Use Windows PowerShell instead of Command Prompt

Add your answer
right arrow

Q73. If you want very less latency - which is better standalone or client mode?

Ans.

Client mode is better for very less latency due to direct communication with the cluster.

  • Client mode allows direct communication with the cluster, reducing latency.

  • Standalone mode requires an additional layer of communication, increasing latency.

  • Client mode is preferred for real-time applications where low latency is crucial.

Add your answer
right arrow

Q74. What are the basic concepts of a programming language suitable for a fresher, and can you provide an example of a coding question that might be asked during an interview?

Ans.

Basic concepts of a programming language for fresher and example coding question

  • Basic concepts include variables, data types, loops, conditionals, functions, and arrays

  • Example coding question: Write a function to find the sum of all elements in an array

  • Understanding of syntax, debugging, and problem-solving skills are also important for a fresher

Add your answer
right arrow
Q75. Can you explain any machine learning model?
Ans.

A machine learning model is a mathematical representation of a real-world process that learns from data to make predictions or decisions.

  • Machine learning models can be categorized into supervised, unsupervised, and reinforcement learning.

  • Supervised learning models are trained on labeled data, while unsupervised learning models find patterns in unlabeled data.

  • Examples of machine learning models include linear regression, decision trees, support vector machines, and neural netw...read more

Add your answer
right arrow

Q76. When a spark job is submitted, what happens at backend. Explain the flow.

Ans.

When a spark job is submitted, various steps are executed at the backend to process the job.

  • The job is submitted to the Spark driver program.

  • The driver program communicates with the cluster manager to request resources.

  • The cluster manager allocates resources (CPU, memory) to the job.

  • The driver program creates DAG (Directed Acyclic Graph) of the job stages and tasks.

  • Tasks are then scheduled and executed on worker nodes in the cluster.

  • Intermediate results are stored in memory o...read more

View 1 answer
right arrow

Q77. What is the concept of inheritance in programming?

Ans.

Inheritance is a concept in programming where a class inherits properties and behaviors from another class.

  • Allows for code reusability by creating a new class based on an existing class

  • Child class can access all public and protected members of the parent class

  • Helps in creating a hierarchy of classes with shared attributes and methods

Add your answer
right arrow

Q78. How many types of subscription in power BI report reserver

Ans.

There are two types of subscriptions in Power BI Report Server.

  • The two types of subscriptions are Power BI Report Server Standard and Power BI Report Server Enterprise.

  • The Standard subscription allows for a single server deployment, while the Enterprise subscription allows for a distributed deployment.

  • The Enterprise subscription also includes additional features such as high availability and disaster recovery.

  • Both subscriptions require a license for each user accessing the re...read more

Add your answer
right arrow
Q79. What is the difference between an abstract class and an interface in Object-Oriented Programming?
Ans.

Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.

  • Abstract class can have constructors, fields, and methods, while interface cannot have any implementation.

  • A class can implement multiple interfaces but can only inherit from one abstract class.

  • Abstract classes are used to define a common base class for related classes, while interfaces are used to define a contract for classes to implement.

  • Example: Abstract class 'Sh...read more

Add your answer
right arrow

Q80. Print the odd numbers inbetween 1 to 10 and greater than 5 using streams

Ans.

Using Java streams to print odd numbers between 1 to 10 and greater than 5

  • Use IntStream.range() to generate numbers from 1 to 10

  • Filter the numbers using filter() to get odd numbers

  • Use filter() again to get numbers greater than 5

  • Print the numbers using forEach()

View 1 answer
right arrow

Q81. How to copy data of all the gdg versions into a single ps file using jcl

Ans.

To copy data of all GDG versions into a single PS file using JCL.

  • Use IDCAMS utility to define a temporary GDG base.

  • Use SORT utility to merge all the GDG versions into a single file.

  • Use IEBGENER utility to copy the merged file to a PS file.

  • Delete the temporary GDG base using IDCAMS utility.

Add your answer
right arrow

Q82. What strategies do you employ to optimize the performance of an Angular application?

Ans.

To optimize the performance of an Angular application, I employ strategies such as lazy loading, tree shaking, AOT compilation, and optimizing change detection.

  • Implement lazy loading to load modules only when needed, reducing initial load time.

  • Utilize tree shaking to remove unused code and reduce bundle size.

  • Use Ahead-of-Time (AOT) compilation to pre-compile templates and improve load time.

  • Optimize change detection by using OnPush strategy and minimizing the number of binding...read more

Add your answer
right arrow

Q83. Are you willing to allocate? Write a program of pass data through function and Explain.

Ans.

Answering a question about willingness to allocate and providing a program to pass data through a function.

  • Yes, I am willing to allocate.

  • To pass data through a function, we can define the function with parameters that will receive the data and then call the function with the data as arguments.

  • For example, if we have a function that adds two numbers, we can pass the numbers as arguments when calling the function.

  • function addNumbers(num1, num2) { return num1 + num2; }

  • var result...read more

Add your answer
right arrow

Q84. How can a circuler cake can be cut into 8 equal pieces with 3 cuts only?

Ans.

A circular cake can be cut into 8 equal pieces with 3 cuts only by cutting the cake into quarters and then making a diagonal cut.

  • Cut the cake into quarters with two cuts, creating four equal pieces.

  • Make a diagonal cut from the center of the cake to the edge, dividing each quarter into two equal pieces.

  • This will result in eight equal pieces of cake with only three cuts.

Add your answer
right arrow

Q85. What are the advantages of hibernate framwork?

Ans.

Hibernate framework provides ORM capabilities, simplifies database access, and improves performance.

  • Hibernate reduces boilerplate code by providing ORM capabilities.

  • It simplifies database access by abstracting away the underlying SQL.

  • Hibernate improves performance by caching data and reducing database round trips.

  • It supports lazy loading, which improves performance by loading data only when needed.

  • Hibernate supports multiple database vendors and provides transaction managemen...read more

Add your answer
right arrow

Q86. What is vmware, what is diffence between standard and DV switch, what is BSOD, how to troubleshoot BSOD in windows server, how to troubleshoot corrupted OS, what patching tools you use

Ans.

Answering questions related to VMware, BSOD, troubleshooting, and patching tools.

  • VMware is a virtualization software that allows multiple operating systems to run on a single physical machine.

  • Standard switch is a virtual switch that connects virtual machines to the physical network, while DV switch is a distributed virtual switch that allows for centralized management of network configurations.

  • BSOD stands for Blue Screen of Death, which is an error screen displayed on Windows...read more

Add your answer
right arrow

Q87. How do you do performance optimization in Spark. Tell how you did it in you project.

Ans.

Performance optimization in Spark involves tuning configurations, optimizing code, and utilizing caching.

  • Tune Spark configurations such as executor memory, number of executors, and shuffle partitions.

  • Optimize code by reducing unnecessary shuffles, using efficient transformations, and avoiding unnecessary data movements.

  • Utilize caching to store intermediate results in memory and avoid recomputation.

  • Example: In my project, I optimized Spark performance by increasing executor me...read more

Add your answer
right arrow

Q88. When do we do the regression testing and why?

Ans.

Regression testing is performed to ensure that changes or updates to a software application do not introduce new defects or impact existing functionality.

  • Regression testing is done after making changes to the software application.

  • It helps in identifying any unintended side effects of the changes.

  • It ensures that previously working features are not broken due to the changes.

  • Regression testing is typically performed during the testing phase of the software development lifecycle....read more

View 1 answer
right arrow
Q89. How do you create an immutable class in Java?
Ans.

To create an immutable class in Java, make the class final, make all fields private and final, provide only getters, and don't provide setters.

  • Make the class final to prevent inheritance.

  • Make all fields private and final to prevent modification.

  • Provide only getters to access the fields.

  • Don't provide setters to modify the fields.

View 1 answer
right arrow

Q90. List - Stores all types of elements Array - Stores one type of element and in sequential memory blocks hence faster access

Ans.

An array stores one type of element in sequential memory blocks for faster access.

  • Arrays are useful for storing and accessing data in a specific order.

  • They can be used to store numbers, characters, or other data types.

  • Arrays can be multidimensional, allowing for more complex data structures.

  • Accessing elements in an array is done using an index, starting at 0.

  • Arrays can be resized dynamically in some programming languages.

Add your answer
right arrow
Q91. Can you explain the life cycles of the MVC (Model-View-Controller) architecture?
Ans.

MVC architecture consists of three components - Model, View, and Controller, each with its own responsibilities.

  • Model represents the data and business logic of the application.

  • View is responsible for displaying the data to the user.

  • Controller acts as an intermediary between Model and View, handling user input and updating the Model accordingly.

  • Changes in one component do not directly affect the others, promoting separation of concerns.

  • Example: In a web application, the Model ...read more

Add your answer
right arrow

Q92. What is overloading and overriding ? What are locators in Selenium? What is the syntax of xpath locator ? What are the methods to write the test cases? Is it mandatory to have input tag in defining xpath?

Ans.

Answers to questions related to automation testing using Selenium

  • Overloading is when a method has the same name but different parameters in the same class, while overriding is when a subclass provides its own implementation of a method already defined in its superclass

  • Locators in Selenium are used to identify web elements on a web page

  • The syntax of xpath locator is //tagname[@attribute='value']

  • Methods to write test cases include boundary value analysis, equivalence partitioni...read more

Add your answer
right arrow

Q93. What is linked list?

Ans.

A linked list is a linear data structure where each element is a separate object with a pointer to the next element.

  • Consists of nodes that contain data and a pointer to the next node

  • Can be singly or doubly linked

  • Used for dynamic memory allocation, implementing stacks and queues, and more

View 1 answer
right arrow

Q94. What is the conditional property of Spring beans and how is it configured?

Ans.

Conditional property in Spring beans allows for conditional bean creation based on specified conditions.

  • Conditional property is used to conditionally create beans based on certain conditions.

  • It is configured using @Conditional annotation on the bean definition class.

  • Examples include @ConditionalOnProperty, @ConditionalOnClass, @ConditionalOnMissingBean, etc.

Add your answer
right arrow

Q95. How do you enable pagination in responses from a REST API ?

Ans.

Pagination in REST API responses can be enabled by using query parameters like 'page' and 'limit'.

  • Use query parameters like 'page' and 'limit' to specify the page number and number of items per page.

  • Implement logic in the backend to fetch and return the appropriate subset of data based on the page and limit values.

  • Include metadata in the response to indicate total number of items and current page number.

  • Example: /api/users?page=2&limit=10 will return the second page of 10 use...read more

Add your answer
right arrow

Q96. How would you implement a JUnit test for a REST API that you have developed?

Ans.

Implementing JUnit test for a REST API

  • Create a test class for the REST API endpoints

  • Use @RunWith(SpringRunner.class) and @SpringBootTest annotations

  • MockMvc to perform HTTP requests and validate responses

  • Use @Autowired to inject dependencies for testing

  • Assert statements to verify expected results

Add your answer
right arrow

Q97. What are custom middleware? Have you implemented in previous project how

Ans.

Custom middleware are functions that have access to the request and response objects in an Express application's request-response cycle.

  • Custom middleware can be used to perform tasks such as logging, authentication, error handling, etc.

  • Middleware functions can be added to the request handling chain using the 'use' method in Express.

  • An example of custom middleware implementation is adding a function to log request details before passing it to the route handler.

Add your answer
right arrow

Q98. What is meant by fact and dimension table?

Ans.

Fact table contains quantitative data while dimension table contains descriptive data.

  • Fact table stores data related to business processes and events

  • Dimension table stores descriptive information about the data in the fact table

  • Fact table is usually larger than dimension table

  • Fact table is connected to dimension table through foreign keys

  • Example: Sales fact table and product dimension table

Add your answer
right arrow

Q99. What is a join and different types of joins?

Ans.

A join is a SQL operation that combines rows from two or more tables based on a related column between them.

  • Types of joins include inner join, left join, right join, and full outer join.

  • Inner join returns only the matching rows from both tables.

  • Left join returns all rows from the left table and matching rows from the right table.

  • Right join returns all rows from the right table and matching rows from the left table.

  • Full outer join returns all rows from both tables, with NULL v...read more

Add your answer
right arrow

Q100. What are the patterns of Microservices. steps to migrate an application from legacy to cloud. spring boot internal functionality. java 8 features

Ans.

Answering questions related to Microservices, cloud migration, Spring Boot, and Java 8 features.

  • Patterns of Microservices include API Gateway, Service Registry, Circuit Breaker, and more.

  • Steps to migrate an application from legacy to cloud include assessing the application, selecting a cloud provider, and refactoring the application.

  • Spring Boot internal functionality includes auto-configuration, embedded server, and more.

  • Java 8 features include Lambda expressions, Stream API,...read more

Add your answer
right arrow
1
2
3
4
5
6
7
Next
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Top LTIMindtree Interview Questions And Answers
Share an Interview