Add office photos
Engaged Employer

Snapdeal

3.8
based on 648 Reviews
Video summary
Filter interviews by

Khosh Solutions Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Create Linked List without using the internal library and provide the functionality of add delete find.

Ans.

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

Add your answer

Q2. Find the total no of the island in a 2d matrix. Working code was required.

Ans.

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.

Add your answer

Q3. The architecture of the current system.

Ans.

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.

Add your answer

Q4. Find loop in a linked list.

Ans.

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.

Add your answer
Discover Khosh Solutions interview dos and don'ts from real experiences

Q5. Difference between Vector and ArrayList.

Ans.

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

Add your answer

Q6. Create an immutable class.

Ans.

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

Add your answer

Q7. Create a Singelton pattern.

Ans.

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.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Software Engineer Interview Questions from Similar Companies

3.7
 • 87 Interview Questions
4.3
 • 33 Interview Questions
3.8
 • 30 Interview Questions
3.9
 • 26 Interview Questions
3.7
 • 16 Interview Questions
3.7
 • 12 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter