Filter interviews by
Clear (1)
posted on 7 Aug 2024
I applied via Naukri.com and was interviewed in Feb 2024. There were 4 interview rounds.
Immutable class is a class whose instances cannot be modified after creation.
Instances of immutable class cannot be changed once created
Immutable classes are often used for objects that should not be modified, like dates or strings
Examples of immutable classes in Java are String, Integer, and LocalDate
Immutable class can be created by making all fields private and final, providing only getters and no setters.
Make all fields private and final
Provide only getters, no setters
Avoid modifying state within the class
A singleton class is a class that can only have one instance created throughout the entire application.
Singleton classes are often used for logging, driver objects, caching, thread pools, database connections, etc.
They have a private constructor to prevent instantiation from other classes.
They provide a global point of access to the instance.
Immutable class is a class whose state cannot be modified after creation.
Use final keyword to make class immutable
Make all fields private and final
Do not provide setter methods
Return new instances when modifying state
Immutable class program in Java
Use the 'final' keyword to make class immutable
Make all fields private and final
Do not provide setter methods, only getter methods
Ensure deep copy of mutable objects in constructor or getter methods
Controller is a general term for classes that handle incoming requests, while RestController is specifically for RESTful web services in Spring.
Controller is a general term for classes that handle incoming requests in a web application.
RestController is a specialized version of a controller that is used for creating RESTful web services in Spring framework.
RestController is annotated with @RestController, which combine...
No, controller and service annotations serve different purposes in a software application.
Controller annotations are used to define the entry points for incoming requests and map them to specific methods in a controller class.
Service annotations are used to mark a class as a service component that can be injected into other classes for business logic implementation.
Mixing up controller and service annotations can lead ...
=== is a strict equality operator in JavaScript that checks if two values are equal in type and value.
=== compares two values without type conversion
Returns true if both values are strictly equal, false otherwise
Example: 5 === '5' returns false because they are of different types
Heap memory is used for dynamic memory allocation, while stack memory is used for static memory allocation.
Heap memory is allocated at runtime and can be accessed randomly, while stack memory is allocated at compile time and is accessed in a LIFO order.
Heap memory is managed manually by the programmer, while stack memory is managed automatically by the system.
Heap memory is larger in size compared to stack memory, but ...
JSP stands for JavaServer Pages, a technology used for creating dynamic web pages using Java.
JSP allows embedding Java code in HTML pages
It is compiled into servlets by the server before execution
JSP simplifies the process of developing web applications by separating the presentation layer from the business logic
Top trending discussions
Find median of 2 sorted arrays in O(log N) time complexity and O(1) space complexity
Use binary search to find the partition point in both arrays
Calculate the median based on the partition point and array sizes
Adjust the partition points based on the median value
Repeat until the partition points are at the median
Handle edge cases such as empty arrays and uneven array sizes
Anagram of strings in O(1) space complexity
Use a fixed size array of integers to store the frequency of characters in the first string
Iterate through the second string and decrement the frequency of each character in the array
If all the frequencies are zero, then the strings are anagrams
Return true or false accordingly
Level order traversal of a tree using Queue
Create a queue and add the root node to it
While the queue is not empty, remove the front node and print its value
Add the left and right child nodes of the removed node to the queue
Repeat until the queue is empty
Reverse level order traversal of a tree using Queue
Create a queue and push the root node into it
While the queue is not empty, pop the front node and push its children into the queue
Add the popped node to a stack
Once the queue is empty, pop elements from the stack and print them
BFS and DFS are graph traversal algorithms. BFS explores nodes level by level while DFS explores nodes depth by depth.
BFS uses a queue while DFS uses a stack or recursion.
BFS is optimal for finding shortest path while DFS is optimal for finding a path between two nodes.
BFS requires more memory as it stores all the nodes at each level while DFS requires less memory.
BFS can be used to find connected components while DFS
Find product of each element of an array except that element in O(N) time complexity without using / operation
Use prefix and suffix products
Multiply prefix and suffix products for each element to get the final product
Handle edge cases where array has 0 or 1 element separately
Recursively delete a linked list
Create a recursive function that takes the head of the linked list as input
Base case: if the head is null, return
Recursively call the function with the next node as input
Delete the current node
Recursively delete a linked list from the end.
Start from the head and recursively traverse to the end of the list.
Delete the last node and set the second last node's next pointer to null.
Repeat until the entire list is deleted.
Use a recursive function to implement the deletion process.
Recursively delete a tree by deleting all its child nodes and then the parent node.
Start from the leaf nodes and delete them first.
Then move up to the parent nodes and delete them.
Repeat until the root node is deleted.
Use post-order traversal to ensure child nodes are deleted before parent nodes.
Recursively delete elements from the end of an array.
Create a recursive function that removes the last element of the array.
Call the function recursively until the desired number of elements are removed.
Handle edge cases such as empty arrays and removing more elements than the array contains.
Floyd Warshall finds shortest path between all pairs of vertices while Djikstra finds shortest path from a single source.
Floyd Warshall is used for dense graphs while Djikstra is used for sparse graphs.
Floyd Warshall has a time complexity of O(n^3) while Djikstra has a time complexity of O((n+m)logn).
Floyd Warshall can handle negative edge weights while Djikstra cannot.
Floyd Warshall can detect negative cycles while Dj
There is no known algorithm to find shortest path in 2-D space in O(log N) time.
The best known algorithm for finding shortest path in 2-D space is Dijkstra's algorithm which has a time complexity of O(N^2).
Other algorithms like A* and Bellman-Ford have better time complexity but still not O(log N).
If the points are on a grid, Lee algorithm can be used which has a time complexity of O(N).
Design a system for putting newspapers using classes and functions
Create a Newspaper class with attributes like title, date, and content
Create a Publisher class with methods to publish and distribute newspapers
Create a Subscriber class with methods to subscribe and receive newspapers
Use inheritance to create different types of newspapers like daily, weekly, etc.
Implement a database to store newspaper information and ha
I believe practical experience is more valuable than higher studies.
I have gained valuable experience through internships and projects.
I prefer hands-on learning and problem-solving over theoretical knowledge.
I am constantly learning and improving my skills through online courses and workshops.
I applied via Company Website and was interviewed before Jun 2020. There were 5 interview rounds.
I applied via Recruitment Consultant and was interviewed in May 2019. There were 4 interview rounds.
posted on 3 Nov 2022
I applied via Campus Placement and was interviewed before Nov 2021. There were 3 interview rounds.
There are 30 basic aptitude question in 30 minutes
3 coding question 2 were easy and 1 was of medium level
I applied via Campus Placement and was interviewed before Sep 2021. There were 4 interview rounds.
Math and verbal round .
General topics to speak
Implement a function to find duplicates in an array of strings using Hashmap.
Create a Hashmap to store the frequency of each string in the array
Iterate through the array and check if the frequency of any string is greater than 1
If yes, add it to the list of duplicates
Return the list of duplicates
I applied via Naukri.com and was interviewed before Jun 2020. There were 5 interview rounds.
MVC life cycle, AJAX call and passing data from view to partial view.
MVC life cycle includes request routing, controller instantiation, action execution, and rendering of the view.
AJAX call is initiated by sending an HTTP request to the server and receiving a response in the form of JSON or XML data.
To pass data from one view to a partial view, we can use ViewBag, ViewData, or TempData.
ViewBag is a dynamic object that ...
Abstract class is a class that cannot be instantiated, while interface is a contract that defines methods.
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have instance variables, while interface cannot.
Abstract class is used for code reusability and polymorphism, while interface is used for achieving abstraction and loose coupling.
In serv...
I applied via LinkedIn and was interviewed before Oct 2020. There were 3 interview rounds.
I applied via Recruitment Consultant and was interviewed in Apr 2021. There were 3 interview rounds.
based on 1 interview
Interview experience
based on 1 review
Rating in categories
Software Specialist
500
salaries
| ₹0 L/yr - ₹0 L/yr |
Strategic Account Manager
216
salaries
| ₹0 L/yr - ₹0 L/yr |
Project Manager
170
salaries
| ₹0 L/yr - ₹0 L/yr |
Implementation Specialist
133
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Developer
116
salaries
| ₹0 L/yr - ₹0 L/yr |
Oracle Cerner
Veradigm
Athenahealth Technology
NextGen Healthcare