LogicMonitor
Mpower Interview Questions and Answers
Q1. What is diff between cyclicBarrier and countDownLatch?
CyclicBarrier allows a group of threads to wait at a barrier until all threads have reached it, while CountDownLatch allows one or more threads to wait until a set of operations being performed in other threads completes.
CyclicBarrier is reusable, while CountDownLatch is not.
CyclicBarrier allows all threads to wait for each other, while CountDownLatch allows one thread to wait for others.
CyclicBarrier resets automatically after all threads have reached the barrier, while Coun...read more
Q2. what is diff between JPARepository and CURDRepository?
JPARepository is a Spring Data interface for JPA-based repositories, while CRUDRepository is a generic interface for CRUD operations.
JPARepository extends CRUDRepository and provides additional JPA-specific methods.
CRUDRepository is a generic interface for CRUD operations on a repository.
JPARepository is typically used for JPA-based repositories, while CRUDRepository can be used for any type of repository.
JPARepository provides methods like findAll(), findById(), save(), dele...read more
Q3. Coding question related find 3nd highest number with single loop and minimum time complexity.
Use a single loop to find the 3rd highest number in an array with minimum time complexity.
Iterate through the array and keep track of the three highest numbers encountered so far.
Update the three highest numbers as you iterate through the array.
Return the third highest number once the loop is completed.
Q4. Type of Class Loaders available in java
Java has three types of class loaders: Bootstrap Class Loader, Extension Class Loader, and System Class Loader.
Bootstrap Class Loader loads core Java classes located in the bootstrap classpath.
Extension Class Loader loads classes from the extensions directory.
System Class Loader loads classes from the classpath specified by the CLASSPATH environment variable.
Q5. How many ways in Java we can handle deadlock or ways to handle synchronisation in Java.
In Java, deadlock can be handled by using techniques like avoiding nested locks, using timeout, and using the java.util.concurrent package.
Avoid nested locks to prevent potential deadlocks.
Use timeout when acquiring locks to prevent indefinite waiting.
Utilize java.util.concurrent package classes like ReentrantLock and Semaphore for more advanced synchronization control.
Q6. Design in-memory file system
Design an in-memory file system for efficient file storage and retrieval
Use a tree data structure to represent directories and files
Implement caching mechanisms to improve performance
Consider using hash tables for fast file lookup
Support file operations like read, write, delete, and search
Ensure data consistency and durability through proper error handling
Q7. How to handle authentication in Spring Boot
Authentication in Spring Boot is handled using Spring Security which provides various authentication mechanisms.
Use Spring Security to configure authentication in Spring Boot
Define a custom UserDetailsService to load user-specific data for authentication
Use annotations like @EnableWebSecurity and @EnableGlobalMethodSecurity to secure endpoints
Configure authentication providers like in-memory, JDBC, LDAP, etc. in the application.properties file
Q8. Todolist implementation
Todolist implementation
Create a UI for adding tasks
Implement functionality to add, delete and mark tasks as complete
Store tasks in a database or local storage
Allow filtering of tasks by status (completed, active)
Add option to edit task details
More about working at LogicMonitor
Interview Process at Mpower
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month