i
HashedIn by Deloitte
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I applied via Referral and was interviewed in Dec 2023. There were 3 interview rounds.
Kadane's Algorithm is used to find the maximum subarray sum in an array.
Iterate through the array and keep track of the maximum sum ending at each index.
If the sum at any index becomes negative, reset the sum to 0.
Return the maximum sum found.
Example: For array [-2, 1, -3, 4, -1, 2, 1, -5, 4], the maximum subarray sum is 6 (from index 3 to 6).
Reverse a linked list by changing the pointers direction
Iterate through the linked list and change the direction of pointers
Use three pointers - current, previous, and next to reverse the list
Update the head of the list to the last node after reversing
Top trending discussions
I applied via Job Fair and was interviewed in Jul 2024. There were 2 interview rounds.
Seeking new challenges and growth opportunities in a dynamic environment.
Desire for professional growth
Seeking new challenges
Interested in a more dynamic work environment
The contract between hashCode and equals method is that if two objects are equal according to the equals method, then their hash codes must also be equal.
hashCode and equals method must be consistent - if two objects are equal according to equals method, their hash codes must be equal
If two objects have the same hash code, they may or may not be equal according to equals method
Overriding equals method in a class requir...
Java 8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods in interfaces.
Lambda expressions allow you to pass functions as arguments.
Functional interfaces have a single abstract method and can be used with lambda expressions.
Streams provide a way to work with sequences of elements.
Default methods allow interfaces to have method implementations.
Ways to start a thread in Java
Extending the Thread class and overriding the run() method
Implementing the Runnable interface and passing it to a Thread object
Using a thread pool from the Executors class
The thread will continue running as it is already active
The thread will not be started again if it is already running
Attempting to start a thread that is already running will not have any effect
The thread will continue its execution without any interruption
Join method is used to wait for a thread to finish its execution, while sleep method is used to pause the execution of a thread for a specified amount of time.
Join method is used to wait for a thread to finish its execution before moving on to the next task.
Sleep method is used to pause the execution of a thread for a specified amount of time, allowing other threads to run.
Example: thread1.join() will wait for thread1 ...
I applied via Naukri.com and was interviewed in Feb 2024. There were 3 interview rounds.
One coding question with 40-45 mcq
Use a nested loop to iterate through the array and check for the sum of squares of two elements equal to the square of a third element.
Iterate through the array using a nested loop to compare all possible combinations of elements.
Calculate the sum of squares of two elements and check if it equals the square of a third element.
Return the elements if a match is found, otherwise continue iterating.
I applied via Naukri.com
Contiguous array in java
I applied via Company Website and was interviewed in Feb 2024. There was 1 interview round.
JOY of energy project checks only solid principles asks question for every letter you type for developing a feature
I applied via Naukri.com and was interviewed in Mar 2023. There were 2 interview rounds.
Microservices communicate with each other through APIs and messaging protocols.
Microservices use APIs to communicate with each other.
Messaging protocols like HTTP, AMQP, and MQTT are used for asynchronous communication.
Service discovery mechanisms like Eureka and Consul are used to locate services.
API gateways like Zuul and Kong are used to manage API traffic.
Event-driven architecture is used for real-time communicatio
Securing APIs involves implementing authentication, authorization, encryption, and input validation.
Implement authentication mechanisms like OAuth, JWT, or API keys
Use authorization to control access to APIs based on user roles and permissions
Encrypt sensitive data transmitted over the network using HTTPS
Validate and sanitize input to prevent common security vulnerabilities like SQL injection or cross-site scripting (X
ORM (Object-Relational Mapping) tool is a software framework that maps objects to relational databases.
ORM tool simplifies database operations by allowing developers to interact with databases using object-oriented programming.
It eliminates the need for writing complex SQL queries by providing a higher-level abstraction.
ORM tools handle tasks like data persistence, retrieval, and mapping between objects and database ta...
Hibernate simplifies database programming in Java applications.
Hibernate provides a simple and efficient way to interact with databases.
It eliminates the need for writing complex SQL queries.
It supports object-oriented programming and mapping of Java classes to database tables.
It provides caching and lazy loading mechanisms for improved performance.
It supports transaction management and reduces the risk of data corrupt...
Rest controller is used for RESTful web services while Controller is used for traditional web applications.
Rest controller maps HTTP requests to RESTful web services while Controller maps HTTP requests to traditional web applications.
Rest controller uses @RestController annotation while Controller uses @Controller annotation.
Rest controller returns data in JSON or XML format while Controller returns data in HTML format...
Using component instead of service may cause confusion and errors in the code.
Components and services are two different concepts in Java development.
Components are used for UI elements while services are used for business logic.
Using component instead of service may lead to errors in the code and confusion for other developers.
For example, if a component is used instead of a service for business logic, it may not have ...
The @Autowired annotation is used to automatically wire beans by matching the data type of the bean with the data type of the property.
Used to inject dependencies automatically
Reduces the need for manual bean configuration
Can be used with constructors, fields, and methods
Can be used with @Qualifier to specify which bean to wire
Eureka server is a service registry that enables microservices to discover and communicate with each other.
Eureka server is a component of Netflix's OSS suite.
It allows services to register themselves and discover other services.
It uses a REST API for communication.
Default port is 8761.
Circuit breaker is a design pattern used to prevent cascading failures in distributed systems. Hystrix is a popular implementation.
Circuit breaker monitors the availability of a service and trips if the service fails repeatedly.
It helps to prevent cascading failures by failing fast and providing fallback options.
Hystrix is a popular implementation of circuit breaker pattern in Java.
It provides features like request cac
Ternary operators are conditional operators that evaluate a boolean expression and return one of two values based on the result.
Ternary operators are written in the form of 'condition ? value1 : value2'
If the condition is true, the operator returns value1, otherwise it returns value2
Ternary operators can be used as a shorthand for if-else statements
Example: int x = (a > b) ? a : b; // assigns the larger value of a and
Entity class represents a table in a database and its attributes as fields.
Define class with @Entity annotation
Add @Id annotation to primary key field
Add @Column annotation to map fields to table columns
Implement getters and setters
Override equals() and hashCode() methods
CRUD is a basic operation for data manipulation while JPA is a Java specification for ORM.
CRUD stands for Create, Read, Update, and Delete which are basic operations for data manipulation.
JPA is a Java specification for Object-Relational Mapping (ORM) which provides a way to map Java objects to relational database tables.
JPA provides a higher level of abstraction and simplifies the data access layer by providing an API...
I applied via Approached by Company and was interviewed in Oct 2022. There were 2 interview rounds.
I applied via Naukri.com and was interviewed in Mar 2021. There were 4 interview rounds.
Yes, finally block will execute even if try and catch have return statement.
The finally block is always executed regardless of whether an exception is thrown or not.
The return statement in try or catch block will be executed before the finally block.
Finally block is commonly used to release resources or perform cleanup operations.
The @Component annotation is a generic stereotype annotation that can be used in place of other annotations.
The @Component annotation is a general-purpose annotation that can be used in place of @Service, @Controller, @Configuration, and @Repository annotations.
However, using more specific annotations can help in better understanding the role of the annotated class.
For example, using @Service annotation on a class that...
No, we cannot use == to compare enums.
Enums are objects and == compares object references, not values.
We should use .equals() method to compare enum values.
based on 1 review
Rating in categories
Software Engineer
404
salaries
| ₹5 L/yr - ₹15.3 L/yr |
Software Engineer2
352
salaries
| ₹8.5 L/yr - ₹22 L/yr |
Senior Software Engineer
207
salaries
| ₹8.5 L/yr - ₹26 L/yr |
Software Engineer II
160
salaries
| ₹10.5 L/yr - ₹23 L/yr |
Senior Product Specialist
159
salaries
| ₹12.4 L/yr - ₹25 L/yr |
TCS
Infosys
Wipro
HCLTech