ZeMoSo Technologies
10+ Capacit'e Infraprojects Interview Questions and Answers
Q1. New technologies learnt in last 6 months.
React Native, GraphQL, Docker
Learned React Native for cross-platform mobile app development
Explored GraphQL for efficient data fetching and manipulation
Gained knowledge in Docker for containerization and deployment
Q2. Write code based on situation with proper implementation using Design patterns etc.
Implement a code scenario using design patterns
Identify the problem statement and requirements
Choose appropriate design patterns like Singleton, Factory, Observer, etc.
Implement the code following the selected design patterns
Test the code for functionality and efficiency
Q3. Default and static methods in interface?
Default and static methods in interface allow for method implementation and utility methods in Java interfaces.
Default methods provide a default implementation for a method in an interface.
Static methods in interfaces can be called directly on the interface itself.
Default and static methods were introduced in Java 8.
Default methods can be overridden by implementing classes.
Static methods cannot be overridden and are not inherited by implementing classes.
Q4. How many type of authentication can be implemented
There are multiple types of authentication that can be implemented, including password-based, token-based, biometric, and multi-factor authentication.
Password-based authentication: Users authenticate themselves using a password.
Token-based authentication: Users authenticate themselves using a token, such as a one-time password or a security key.
Biometric authentication: Users authenticate themselves using their unique biological characteristics, such as fingerprints or facial...read more
Q5. Design a database scheme of one of the known website.
Design a database scheme for Amazon website
Create tables for users, products, orders, reviews, and payments
Use primary and foreign keys to establish relationships between tables
Include attributes such as user_id, product_id, order_id, review_id, and payment_id
Implement indexes for faster data retrieval
Consider denormalization for performance optimization
Q6. Find the number of consecutive alphabets in a string.
The question asks to find the number of consecutive alphabets in a string.
Iterate through the string and check if each character is consecutive to the previous one.
Keep track of the count of consecutive alphabets encountered.
Return the count at the end.
Q7. Singleton pattern for thread safety .
Singleton pattern ensures only one instance of a class is created and provides a global point of access to it.
Use lazy initialization to create the instance only when needed.
Use synchronized keyword to make the getInstance() method thread-safe.
Consider using double-checked locking for better performance.
Use enum to implement singleton pattern as it is inherently thread-safe.
Q8. API to update the salary of the employee
API endpoint to update employee salary
Create a PUT request endpoint with employee ID and new salary as parameters
Verify user authentication and authorization before updating the salary
Update the salary in the database and return success message
Q9. Develop springboot api for a given table
Develop a Spring Boot API for a given table
Create a Spring Boot project with necessary dependencies
Define entity class representing the table
Create a repository interface extending JpaRepository
Implement service layer with business logic
Create REST controller with CRUD operations
Q10. Linked list implementation
Linked list is a data structure where each element points to the next element in the sequence.
Nodes contain data and a reference to the next node
Insertion and deletion can be done efficiently in a linked list
Traversal starts from the head node and follows the next pointers
Q11. Height of the binary tree
Height of a binary tree is the maximum number of edges on the longest path from the root node to a leaf node.
The height of an empty tree is -1.
The height of a tree with only one node is 0.
The height of a binary tree can be calculated recursively by finding the height of the left and right subtrees and adding 1 to the maximum of the two heights.
Q12. Caching in Hibernate
Caching in Hibernate improves performance by storing frequently accessed data in memory.
Hibernate supports first-level cache at session level
Second-level cache can be configured at session factory level
Caching strategies include read-only, read-write, and transactional
Cache providers like Ehcache, Infinispan, and Hazelcast can be used
Q13. sort 0 and 1
Sort an array of 0s and 1s in linear time complexity.
Use two pointers approach - one from the start and one from the end of the array.
Swap 0s to the left side and 1s to the right side until the pointers meet.
Time complexity: O(n), Space complexity: O(1)
Q14. Implement LRU cache
LRU cache is a data structure that stores the most recently used items, discarding the least recently used items when full.
Use a combination of a doubly linked list and a hashmap to efficiently implement LRU cache.
Keep track of the most recently used item at the head of the linked list and the least recently used item at the tail.
When a new item is accessed, move it to the head of the linked list and update the hashmap accordingly.
If the cache is full, remove the item at the ...read more
Q15. Middleware in nodejs
Middleware in Node.js is a function that has access to the request and response objects, and can modify or terminate the request-response cycle.
Middleware functions are executed sequentially in the order they are defined.
They can be used for tasks such as logging, authentication, error handling, etc.
Example: Express.js uses middleware to handle requests before they reach the route handler.
Interview Process at Capacit'e Infraprojects
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month