10405090xyzabc
Larsen & Toubro Limited Interview Questions and Answers
Q1. What is a use case diagram, and in what scenarios is it typically utilized?
A use case diagram is a visual representation of the interactions between users and a system, showing the various use cases and actors involved.
Use case diagrams are typically utilized in software development to capture the functional requirements of a system.
They help in identifying the different ways users can interact with the system and the various scenarios that can occur.
Use case diagrams show the relationships between actors (users) and use cases, helping in understand...read more
Q2. What is a use case diagram, and in which scenarios is it typically used?
A use case diagram is a visual representation of the interactions between users and a system, showing the different ways users can interact with the system.
Use case diagrams are typically used in software development to capture the functional requirements of a system.
They help in identifying the actors (users) and their interactions with the system.
Use case diagrams show the various use cases or scenarios in which the system can be used.
They are useful for communicating syste...read more
Q3. how to reverse a linklist
To reverse a linked list, iterate through the list and change the direction of pointers.
Iterate through the linked list and keep track of the previous, current, and next nodes.
Update the pointers of each node to reverse the direction.
Set the head of the linked list to the last node encountered during iteration.
Q4. Define encapsulation and provide an example. Discuss the principles of inheritance and polymorphism.
Encapsulation is the concept of bundling data and methods that operate on the data into a single unit. Inheritance allows a class to inherit attributes and methods from another class. Polymorphism allows objects of different classes to be treated as objects of a common superclass.
Encapsulation helps in data hiding and abstraction
Example: A class 'Car' encapsulates data like make, model, and methods like start(), stop()
Inheritance allows for code reusability and promotes the c...read more
Q5. Explain how to detect a cycle in a linked list.
Use Floyd's Tortoise and Hare algorithm to detect a cycle in a linked list.
Start with two pointers, slow and fast, moving at different speeds.
If there is a cycle, the two pointers will eventually meet at some point.
If there is no cycle, the fast pointer will reach the end of the list.
Example: 1->2->3->4->5->2 (cycle at node 2), slow and fast pointers will meet at node 2.
Q6. What is a transaction in DBMS, what are ACID properties? Explain the difference between SQL and NoSQL databases. How would you optimize a slow running query?
A transaction in DBMS is a unit of work that must be executed as a whole. ACID properties ensure data integrity. SQL is relational, NoSQL is non-relational.
A transaction in DBMS is a set of operations that must be executed as a single unit.
ACID properties (Atomicity, Consistency, Isolation, Durability) ensure data integrity in transactions.
SQL databases are relational and use structured query language, while NoSQL databases are non-relational and offer more flexibility.
To opt...read more
Top HR Questions asked in Larsen & Toubro Limited
Interview Process at Larsen & Toubro Limited
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month