R Systems International
20+ Inttrvu Learning Platform Interview Questions and Answers
Q1. In SQL, we have a table casting, which maps actor_id with movie_id. Find the pair of actors, who acted together for the most time. if you have multiple combos, you can return any of them.
Find the pair of actors who acted together for the most time in a SQL table.
Join the casting table with itself on movie_id to get pairs of actors who acted together.
Calculate the total time they acted together by summing the durations of their movies.
Order the results by total time and return the pair with the highest duration.
Q2. 1. What is Ajax? 2. Write JS code to implement AJAX. 3. What is hoisting? 4. Questions regarding this keywords.
Questions on Ajax, JS code for AJAX, hoisting, and related keywords for Senior Software Engineer role.
Ajax is a technique for creating fast and dynamic web pages without reloading the entire page.
JS code for AJAX involves creating an XMLHttpRequest object, defining a callback function, and sending a request to the server.
Hoisting is a JS mechanism where variables and function declarations are moved to the top of their scope.
Related keywords include let, const, var, function, ...read more
Q3. Dependency injection- what is it and any use case where to use?
Dependency injection is a design pattern where components are provided with their dependencies rather than creating them internally.
Dependency injection helps in achieving loose coupling between components.
It makes components easier to test by allowing for easier mocking of dependencies.
Use cases include injecting database connections, logging services, and external API clients into components.
Q4. Data seeding in entity framework and how to map tables with entity?
Data seeding in Entity Framework involves pre-populating database tables with initial data. Mapping tables with entities involves defining relationships between database tables and entity classes.
Data seeding in Entity Framework can be done using the 'Seed' method in the 'Configuration' class of the DbContext.
To map tables with entities, use data annotations or Fluent API to define relationships between entities and database tables.
For example, using data annotations like [Ta...read more
Q5. Implement a React JS program to change background colour of div if box input of both of the two input boxes is greater than 10.
React program to change div background color if both input boxes > 10
Create a state for each input box
Add onChange event to each input box to update state
Use useEffect to check if both input values are greater than 10
If true, update state to change div background color
Q6. Why do we use SOLID principle, SRP and OCP violation?
SOLID principles help in creating maintainable, scalable, and flexible software.
SOLID principles help in creating software that is easier to maintain and extend.
Single Responsibility Principle (SRP) ensures that a class has only one reason to change, leading to more modular and cohesive code.
Open/Closed Principle (OCP) states that a class should be open for extension but closed for modification, allowing for easy changes and additions without altering existing code.
Violating ...read more
Q7. What is singleton design pattern and how to implement it?
Singleton design pattern ensures a class has only one instance and provides a global point of access to it.
Create a private static instance of the class within the class itself.
Provide a public static method to access the instance.
Ensure the constructor of the class is private to prevent instantiation from outside the class.
Example: Singleton pattern is commonly used in database connections to ensure only one connection is established.
Q8. How can we debug the any published dll?
Debugging a published dll involves using tools like Visual Studio debugger and logging mechanisms.
Use Visual Studio debugger to attach to the process using the published dll
Set breakpoints in the code to pause execution and inspect variables
Use logging mechanisms to track the flow of execution and identify issues
Check for any exceptions or errors thrown by the dll
Q9. Wat is Dependency Injection? Explain with an example.
Dependency Injection is a design pattern used to remove hard-coded dependencies and make code more flexible.
It allows objects to be created with their dependencies rather than creating them inside the object.
It makes code more testable and maintainable.
Example: Instead of creating a database connection inside a class, pass it as a parameter during object creation.
Q10. Custom key for hashmap, should it be immutable?
Yes, it should be immutable.
Immutable keys ensure that the hashcode of the key remains constant, which is important for efficient hashmap operations.
If a key is mutable, its hashcode can change during its lifetime, leading to unexpected behavior in the hashmap.
Examples of immutable keys include String, Integer, and other wrapper classes.
Q11. Difference between lambda and method reference.
Lambda is an anonymous function while method reference refers to an existing method.
Lambda expressions are used to create anonymous functions that can be passed as arguments to methods or stored in variables.
Method references are used to refer to an existing method by name instead of defining a new lambda expression.
Lambda expressions are more flexible and can be used to create functions with any number of parameters, while method references can only refer to methods with mat...read more
Q12. What are design principles and design pattern
Design principles are guidelines for designing software solutions, while design patterns are reusable solutions to common design problems.
Design principles are high-level guidelines that help in designing software solutions that are scalable, maintainable, and efficient.
Design patterns are reusable solutions to common design problems that have been proven to be effective in various scenarios.
Examples of design principles include SOLID principles, DRY (Don't Repeat Yourself), ...read more
Q13. Difference between static and volatile
Static variables are shared among all instances of a class, while volatile variables are used for synchronization.
Static variables are declared with the 'static' keyword and retain their value across multiple function calls.
Volatile variables are used to indicate that a variable's value can be modified by multiple threads.
Static variables are stored in the data segment of memory, while volatile variables are stored in the stack or heap.
Static variables are initialized only on...read more
Q14. Oops concepts in real life.
Oops concepts in real life refer to the principles of object-oriented programming applied to everyday scenarios.
Encapsulation: Keeping related data and methods together to protect them from outside interference. Example: A car's engine is encapsulated within the car's body.
Inheritance: Allowing a new class to inherit properties and behaviors from an existing class. Example: A child inheriting traits from their parents.
Polymorphism: Objects of different classes can be treated ...read more
Q15. Difference between MVC and WebAPI?
MVC is a design pattern for organizing code in a web application, while WebAPI is a framework for building HTTP services.
MVC stands for Model-View-Controller and is used for structuring code in a web application
WebAPI is a framework for building HTTP services that can be accessed by various clients
MVC is typically used for creating web applications with user interfaces, while WebAPI is used for creating APIs that can be consumed by different clients
MVC is more focused on the ...read more
Q16. What is factory pattern
Factory pattern is a creational design pattern that provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.
Factory pattern is used to create objects without specifying the exact class of object that will be created.
It provides a way to delegate the instantiation logic to child classes.
Commonly used in situations where a class can't anticipate the class of objects it must create.
Examples include GUI f...read more
Q17. What is dependency injection
Dependency injection is a design pattern where components are given their dependencies rather than creating them internally.
Allows for better code reusability and testability
Reduces coupling between components
Promotes separation of concerns
Examples: Constructor injection, Setter injection, Interface injection
Q18. Use of serialversionuid
serialversionuid is a unique identifier used for serialization and deserialization of Java objects.
serialversionuid is a static field in a class that implements Serializable interface
It is used to ensure that the same class is used for deserialization as was used for serialization
If serialversionuid is not specified, JVM generates it based on class structure which can cause issues if class structure changes
It is recommended to specify serialversionuid for all Serializable cla...read more
Q19. Cyclic dependency in spring
Cyclic dependency in Spring
Cyclic dependency occurs when two or more beans depend on each other directly or indirectly
It can cause runtime errors like StackOverflowError or BeanCurrentlyInCreationException
To resolve, use setter injection or constructor injection instead of field injection
Use @Lazy annotation to delay bean initialization
Use @Autowired(required = false) to break the cycle
Q20. SOLID designed Principle
SOLID is a set of design principles to make software more maintainable, scalable, and flexible.
S - Single Responsibility Principle: A class should have only one reason to change.
O - Open/Closed Principle: Software entities should be open for extension but closed for modification.
L - Liskov Substitution Principle: Subtypes should be substitutable for their base types.
I - Interface Segregation Principle: Clients should not be forced to depend on interfaces they do not use.
D - D...read more
Q21. Wat is Dependency Injection
Dependency Injection is a design pattern that allows objects to receive dependencies from an external source rather than creating them themselves.
It separates the creation of objects from the objects that use them
It makes code more modular and easier to test
It can be implemented using constructor injection, setter injection, or interface injection
Example: Instead of creating a database connection object inside a class, the object is passed in as a parameter from outside the c...read more
More about working at R Systems International
Interview Process at Inttrvu Learning Platform
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month