Filter interviews by
I was interviewed before Feb 2016.
A circular linked list is a linked list where the last node points back to the first node, forming a loop.
Create a Node class with data and next pointer
Initialize the head and tail pointers to null
When adding a node, if the list is empty, set head and tail to the new node
If the list is not empty, set the next pointer of the tail to the new node and update the tail
To traverse the circular linked list, start from the hea...
To create a singleton class in a multi-threaded environment, we can use double-checked locking or synchronized block.
Use double-checked locking to minimize the use of synchronization and improve performance.
In double-checked locking, check if the instance is null, then synchronize the block and create the instance.
Use volatile keyword to ensure visibility of the instance across threads.
Alternatively, use synchronized b...
The wait method in the Object class is used for inter-thread communication and synchronization.
wait() is used to make a thread wait until another thread notifies it.
It is used in multi-threaded applications to coordinate the execution of threads.
wait() releases the lock held by the current thread, allowing other threads to acquire it.
It is typically used in conjunction with notify() and notifyAll() methods.
Example: wai...
No, generics are not limited to collections.
Generics can be used with any type of class or interface, not just collections.
They provide type safety and allow for code reusability.
For example, generics can be used with classes like ArrayList, LinkedList, HashMap, etc.
They can also be used with interfaces like Comparable, Iterator, etc.
RDBMS is a relational database management system that uses structured data, while NoSQL is a non-relational database that uses unstructured data.
RDBMS stores data in tables with predefined schemas, while NoSQL stores data in various formats like key-value, document, columnar, or graph.
RDBMS supports ACID (Atomicity, Consistency, Isolation, Durability) properties, while NoSQL sacrifices some of these properties for scal...
Normalization is the process of organizing data in a database to eliminate redundancy and improve data integrity.
Normalization helps in reducing data redundancy by breaking down a database into multiple tables.
It ensures that each table has a single purpose and avoids data duplication.
Normalization follows a set of rules called normal forms, such as First Normal Form (1NF), Second Normal Form (2NF), etc.
By eliminating ...
HashMap is an unordered collection while LinkedHashMap maintains insertion order.
HashMap uses hash table to store key-value pairs.
LinkedHashMap uses doubly-linked list to maintain the insertion order.
HashMap provides faster access and retrieval time complexity.
LinkedHashMap provides predictable iteration order based on insertion order.
Example: HashMap - {1=A, 2=B, 3=C}, LinkedHashMap - {1=A, 2=B, 3=C}
An immutable class in Java is a class whose state cannot be modified after it is created.
Declare the class as final to prevent inheritance
Declare all fields as private and final
Do not provide any setter methods
Ensure that any mutable objects within the class are not accessible or modifiable
Provide only getter methods to access the fields
If a field is mutable, return a copy of it instead of the original object
Top trending discussions
DSA is important nowadays
Need to have good communication skill
DSA is important nowadays
Need to have good communication skill
I applied via Referral and was interviewed before Dec 2020. There was 1 interview round.
Ascending number array code sorts numbers in ascending order.
Declare an array of integers.
Use a loop to iterate through the array.
Compare adjacent elements and swap them if they are in the wrong order.
Repeat until the array is sorted in ascending order.
Software Engineer
91
salaries
| ₹7 L/yr - ₹20.4 L/yr |
Business Process Executive
73
salaries
| ₹2.5 L/yr - ₹5.2 L/yr |
Senior Business Process Executive
70
salaries
| ₹3.8 L/yr - ₹6.1 L/yr |
Senior Software Engineer
49
salaries
| ₹11.2 L/yr - ₹26.8 L/yr |
Software Developer
20
salaries
| ₹6.7 L/yr - ₹20.5 L/yr |
Cartrade.com
Mahindra First Choice Wheels
CarDekho
Maruti True Value