Kyndryl
T & H SOFTWARE Interview Questions and Answers
Q1. what is abstraction and how can we achieve it?
Abstraction is the concept of hiding complex implementation details and showing only the necessary features to the outside world.
Abstraction allows us to focus on what an object does rather than how it does it
Achieved through abstract classes and interfaces in object-oriented programming
Example: A car dashboard abstracts the internal workings of the car and provides only essential information to the driver
Q2. write a query to get 3rd highest salary from the employee table
Query to retrieve the 3rd highest salary from the employee table
Use the ORDER BY clause to sort salaries in descending order
Use the LIMIT clause to retrieve the 3rd highest salary
Q3. write a code to get 2nd last node and its value from the singly linked list.
Traverse the linked list to find the 2nd last node and return its value.
Traverse the linked list while keeping track of the current and previous nodes.
Once at the end of the list, return the value of the previous node.
Q4. you have an array of integer and retrieve the 2 smallest number from it without sorting the array.
Use two variables to keep track of the smallest and second smallest numbers in the array.
Iterate through the array and update the variables accordingly.
Initialize the variables with the maximum possible integer value to start with.
Example: array = [5, 2, 8, 1, 3], smallest = 1, secondSmallest = 2.
Q5. how get() works insterally in hashmap
The get() method in HashMap retrieves the value associated with a specified key.
get() method takes a key as input and returns the value associated with that key in the HashMap.
Internally, get() uses the hash code of the key to find the corresponding bucket in the HashMap.
If multiple keys have the same hash code, get() uses the equals() method to find the correct key-value pair.
Q6. what is normalization?
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization helps in minimizing data redundancy by dividing the database into multiple tables and defining relationships between them.
It ensures data integrity by avoiding update anomalies and inconsistencies.
There are different normal forms such as 1NF, 2NF, 3NF, BCNF, and 4NF, each with specific rules to follow.
For example, in 1NF, each column should contain atomi...read more
Q7. what are constraints?
Constraints are limitations or restrictions placed on a system or process.
Constraints define the boundaries within which a system must operate.
They can include limitations on resources, time, or functionality.
Examples of constraints in software engineering include memory limitations, processing speed, and input/output requirements.
Q8. difference between hashtable and hashmap
Hashtable is synchronized, while hashmap is not. Hashtable does not allow null keys or values, while hashmap does.
Hashtable is synchronized, while hashmap is not
Hashtable does not allow null keys or values, while hashmap does
Hashtable is a legacy class, while hashmap is a newer class
More about working at Kyndryl
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month