
Snapdeal


Snapdeal Senior Software Engineer Interview Questions and Answers
Q1. Create Linked List without using the internal library and provide the functionality of add delete find.
Create Linked List without using internal library and provide add, delete, find functionality.
Create a Node class with data and next pointer
Create a LinkedList class with head pointer and methods to add, delete, and find nodes
Use a loop to traverse the list and perform operations
Handle edge cases such as adding to an empty list or deleting the head node
Q2. Find the total no of the island in a 2d matrix. Working code was required.
Find the total no of islands in a 2D matrix.
Use DFS or BFS to traverse the matrix.
Mark visited cells to avoid repetition.
Count the number of islands found.
Q3. The architecture of the current system.
The current system follows a microservices architecture.
The system is divided into multiple independent services.
Each service has its own database and communicates with other services through APIs.
The architecture allows for scalability and flexibility.
Examples of microservices used in the system include user authentication, payment processing, and inventory management.
Q4. Find loop in a linked list.
Loop detection in a linked list.
Use two pointers, one moving at twice the speed of the other.
If there is a loop, the faster pointer will eventually catch up to the slower one.
If there is no loop, the faster pointer will reach the end of the list.
Q5. Difference between Vector and ArrayList.
Vector is synchronized and ArrayList is not. Vector is thread-safe and ArrayList is not.
Vector is a legacy class and ArrayList is a part of the Java Collection Framework.
Vector is synchronized which means only one thread can access it at a time, while ArrayList is not.
Vector is thread-safe which means it can be used in a multi-threaded environment, while ArrayList is not.
Vector is slower than ArrayList because of synchronization.
Vector increases its size by 100% while ArrayLi...read more
Q6. Create an immutable class.
An immutable class is a class whose instances cannot be modified after creation.
Make all fields private and final
Don't provide any setter methods
Ensure that any mutable objects passed to the constructor are defensively copied
Make the class final so that it cannot be subclassed
Q7. Create a Singelton pattern.
Singleton pattern ensures only one instance of a class is created and provides a global point of access to it.
Create a private constructor to prevent direct instantiation of the class.
Create a private static instance of the class.
Create a public static method to access the instance, and create the instance if it doesn't exist.
Ensure thread safety by using synchronized keyword or double-checked locking.

Top Senior Software Engineer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

