LTIMindtree interview prep
5 practice questions on the topics candidates reported from LTIMindtree interviews, with answers. The questions are ours; each one links to the interview report that names its topic.
DSA 1
-
Take the first 7 prime numbers and keep every other one, starting with the first. What do you get?
- 2, 5, 11, 17
- 3, 7, 13
- 2, 3, 5, 7
- 2, 5, 11, 15
Show the answer
A. 2, 5, 11, 17
The first 7 primes are 2, 3, 5, 7, 11, 13 and 17; positions 1, 3, 5 and 7 give 2, 5, 11 and 17. Test a number for primality by trying divisors up to its square root; 15 is out because 3 divides it, and 1 is not prime.
This topic is named in a candidate’s interview report: Campus interview, 2026, on Reddit.
Java 1
-
A class implements Runnable with a run() method. Which line actually starts a new thread that runs it?
- task.run();
- new Thread(task).run();
- new Thread(task).start();
- Thread.run(task);
Show the answer
C. new Thread(task).start();
start() asks the JVM for a new thread, which then calls run(). Calling run() yourself just runs the method on the current thread, like any call. Implementing Runnable is usually preferred to extending Thread: the class stays free to extend something else, and the task can go to an ExecutorService.
This topic is named in a candidate’s interview report: Campus interview, 2026, on Reddit.
OOP 2
-
Car and Truck both need start(), stop() and fuelLevel(). What does making both extend a Vehicle class give you?
- One shared copy of that code, and the ability to treat any Car or Truck as a Vehicle, for example in a List<Vehicle>
- Faster code at run time
- Vehicle's private fields become public
- Nothing beyond renaming the classes
Show the answer
A. One shared copy of that code, and the ability to treat any Car or Truck as a Vehicle, for example in a List<Vehicle>
Inheritance gives reuse and an is-a relationship: code written for Vehicle works for every kind of vehicle. Use it when the subclass truly is a kind of the parent; when a class only needs another's behaviour, holding it as a field (composition) is usually better.
This topic is named in a candidate’s interview report: Campus interview, 2026, on Reddit.
-
Which kinds of inheritance between classes does Java allow?
- Only single
- Single, multilevel and hierarchical, but not multiple
- Single, multiple and hybrid
- Every kind, including multiple
Show the answer
B. Single, multilevel and hierarchical, but not multiple
Single: B extends A. Multilevel: C extends B extends A. Hierarchical: B and C both extend A. A class cannot extend two classes, which avoids the diamond problem, but it may implement many interfaces. C++ allows multiple inheritance of classes.
This topic is named in a candidate’s interview report: Campus interview, 2026, on Reddit.
Operating systems 1
-
What is the key difference between two processes and two threads of one process?
- Processes have separate address spaces; threads of one process share memory
- Threads cannot run at the same time
- Processes share memory; threads do not
- Threads each need their own copy of the program code
Show the answer
A. Processes have separate address spaces; threads of one process share memory
Threads share the process's heap, globals and open files, so they communicate cheaply but need locks. Processes are isolated, so one crashing does not take the other down, and they talk through pipes, sockets or shared memory.
This topic is named in a candidate’s interview report: Campus interview, 2026, on Reddit.