Filter interviews by
Top trending discussions
posted on 28 Feb 2025
I was interviewed in Sep 2024.
posted on 25 Jan 2025
I was interviewed in Dec 2024.
A standardized assessment that measures a person's skills, cognitive abilities, and potential to perform in a specific role.
The first round was a group discussion about online shopping.
ArrayList and LinkedList are both classes in Java that implement the List interface, but they have different underlying data structures.
ArrayList uses a dynamic array to store elements, providing fast random access but slower insertion and deletion.
LinkedList uses a doubly linked list to store elements, providing fast insertion and deletion but slower random access.
Choose ArrayList when you need fast random access and ...
Using synchronized keyword for thread synchronization in Java has advantages like simplicity and disadvantages like potential for deadlock. ReentrantLock offers more flexibility and control.
Advantages of synchronized keyword: simplicity, built-in support in Java
Disadvantages of synchronized keyword: potential for deadlock, lack of flexibility
ReentrantLock offers more control over locking, ability to try and lock with t...
In Java, == compares memory addresses while .equals() compares values of objects. Improper usage can lead to unexpected results.
Use == to compare primitive data types or check if two objects reference the same memory address.
Use .equals() to compare the values of objects, such as strings or custom classes.
Improper usage of == with objects can lead to unexpected results as it compares memory addresses, not values.
The Java garbage collector is responsible for automatically managing memory by reclaiming unused objects.
The garbage collector in Java runs in the background and automatically reclaims memory from objects that are no longer in use.
There are different types of garbage collection algorithms in Java, such as Serial, Parallel, CMS, G1, and ZGC.
Each garbage collection algorithm has its own characteristics and is suitable fo
Java 8 introduced features like lambdas and Stream API which have revolutionized the way Java applications are written.
Lambdas allow for more concise and readable code by enabling functional programming paradigms.
Stream API provides a way to process collections of objects in a functional style, making code more expressive and efficient.
Java 8 also introduced default methods in interfaces, allowing for backward compatib...
Checked exceptions are checked at compile time, while unchecked exceptions are not. Proper handling involves either catching or declaring the exception.
Checked exceptions must be either caught or declared in the method signature using the 'throws' keyword.
Unchecked exceptions do not need to be caught or declared, but can still be handled using try-catch blocks.
Examples of checked exceptions include IOException and Clas...
The Java Memory Model defines how threads interact through memory and how synchronization ensures data consistency.
Java Memory Model specifies how threads interact with memory, ensuring data consistency
It defines rules for reading and writing shared variables in a multithreaded environment
Synchronization mechanisms like synchronized blocks and locks ensure proper visibility and ordering of memory operations
The 'volatil...
Method overloading is when multiple methods have the same name but different parameters, while method overriding is when a subclass provides a specific implementation of a method in its superclass.
Method overloading is achieved within the same class by having multiple methods with the same name but different parameters.
Method overriding occurs in a subclass that provides a specific implementation of a method that is al...
Functional interfaces in Java are interfaces with a single abstract method. They can be used with lambda expressions for functional programming.
Functional interfaces have only one abstract method, but can have multiple default or static methods.
Lambda expressions can be used to implement the abstract method of a functional interface concisely.
An example of a custom functional interface is 'Calculator' with a single abs
Java Stream is a sequence of elements that supports functional-style operations. It differs from Iterator by allowing for more concise and declarative code.
Streams can process elements in a collection in a declarative way, allowing for functional-style operations like map, filter, and reduce.
Streams do not store elements, they operate on the source data structure (e.g., List) directly.
Iterators are used to iterate over...
Immutability in Java means objects cannot be modified after creation. String class achieves immutability by not allowing changes to its value.
Immutability means once an object is created, its state cannot be changed.
String class achieves immutability by making its value final and not providing any methods to modify it.
Advantages of immutable objects include thread safety, caching, and easier debugging.
Example: String s...
final, finally, and finalize have different meanings in Java.
final is a keyword used to declare constants, immutable variables, or prevent method overriding.
finally is a block used in exception handling to execute code after try-catch block.
finalize is a method used for cleanup operations before an object is garbage collected.
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.
Provide a public static method to access the instance.
Use synchronized keyword or double-checked locking to ensure thread safety.
Java annotations are metadata that provide data about a program but do not affect the program itself. They are used in frameworks like Spring to configure and customize behavior.
Java annotations are used to provide metadata about a program, such as information about classes, methods, or fields.
In frameworks like Spring, annotations are used to configure various aspects of the application, such as defining beans, handli...
Java Streams handle parallel processing by splitting the data into multiple chunks and processing them concurrently.
Java Streams use the Fork/Join framework to split the data into chunks and process them in parallel.
Potential pitfalls include increased overhead due to thread management, potential race conditions, and decreased performance for small datasets.
Pitfalls can be mitigated by ensuring thread safety, avoiding ...
ArrayList is preferred for frequent retrieval operations, while LinkedList is suitable for frequent insertions/deletions.
Use ArrayList when you need fast random access and retrieval operations, such as searching for elements in a list.
Choose LinkedList when you need fast insertions/deletions, especially at the beginning or end of the list.
Consider memory overhead and performance trade-offs when deciding between ArrayLi...
ReentrantLock should be used instead of synchronized when more flexibility and control over locking mechanisms is needed.
Use ReentrantLock when you need to implement custom locking strategies or require advanced features like tryLock() and lockInterruptibly()
ReentrantLock supports fair locking mechanisms, ensuring that threads acquire the lock in the order they requested it
ReentrantLock allows for more fine-grained con...
In Java, == checks for reference equality while equals() checks for value equality. Misuse of == can lead to logical errors.
Override equals() when you want to compare the actual content of objects in user-defined classes.
Override hashCode() alongside equals() to ensure consistent behavior in hash-based collections.
Implement Comparable interface and override compareTo() for natural ordering of objects.
Garbage collection in Java automatically reclaims memory occupied by unused objects using different algorithms and memory regions.
Force garbage collection in Java using System.gc() or Runtime.getRuntime().gc()
Not recommended to force garbage collection as it can cause performance issues and disrupt the JVM's optimization
Example: System.gc();
Lambda expressions in Java 8 improve readability and maintainability by allowing concise and functional-style programming.
Lambda expressions reduce boilerplate code by providing a more compact syntax for implementing functional interfaces.
They make code more readable by focusing on the behavior being passed as an argument, rather than the mechanics of how it is implemented.
Lambda expressions enable developers to write ...
I was interviewed before Mar 2024.
Not much harder mostly focus on basic coding Questions
I applied via Company Website and was interviewed in Oct 2024. There were 3 interview rounds.
It was a coding round interview along with interviewer via Virtual mode. I was given 2 coding questions on HackerRank for the interview:
1. one was an easy problem on counting minimum replacements.
2. "pat is an ordinary kid who works hard to be a great runner...." this was a challenging problem (which I managed to solve).
3. I was asked some basic Python questions, as the role was for a Python Developer.
I would use a relational database like MySQL for the Parking lot as it provides structured data storage and supports complex queries.
Relational databases like MySQL offer structured data storage for parking lot information
Supports complex queries for managing parking lot data efficiently
Ability to handle large amounts of data and transactions
Provides data integrity and security features
Can easily integrate with other s
posted on 17 Jan 2025
I was interviewed in Dec 2024.
Mainly 4 Questions
1-2 MCQ
3: Create a class deriving from IReptile and return an object of HatchEgg which has Hatch Method. Hatch Method should return same IReptile object.
4) Sorting IDs in dictionary
I applied via Referral and was interviewed in Sep 2024. There were 2 interview rounds.
Use dynamic programming to find the longest palindromic substring in a given string.
Iterate through the string and expand around each character to find palindromes.
Store the length of the longest palindrome found so far.
Return the substring based on the start and end indices of the longest palindrome.
To serialize and deserialize a tree, use a recursive approach to traverse the tree and store the data in a suitable format.
Use pre-order traversal to serialize the tree by storing the node values in a list or string.
For deserialization, reconstruct the tree by recursively building nodes from the serialized data.
Consider using JSON or XML format for serialization to easily store and retrieve tree structure.
Use regex library to match given regex with string.
Use a regex library like re in Python to match the given regex with the string.
Check if the regex matches the string using the library functions.
Handle cases where the regex contains special characters like . and * appropriately.
Throttling is a technique used to control the rate of requests sent to a server.
Throttling helps prevent server overload by limiting the number of requests processed at a time.
Implementing a throttle function involves setting a maximum request rate and delaying excess requests.
Example: Implementing a throttle function in a web application to limit the number of API calls made to a third-party service.
Example: Throttlin...
Sort the squares of elements in a sorted array and return the sorted response.
Iterate through the array and square each element.
Store the squared values in a new array.
Sort the new array and return it.
A promise is a commitment to do something in the future, typically used for asynchronous operations in JavaScript.
Promises are used to handle asynchronous operations in JavaScript.
They represent a value that may be available now, in the future, or never.
Promises have three states: pending, fulfilled, or rejected.
Example: new Promise((resolve, reject) => { setTimeout(() => resolve('Done!'), 1000); });
Event loop is a mechanism that allows for asynchronous execution of code by managing the order of events in a single thread.
Event loop continuously checks the call stack for any functions that need to be executed, and processes them in a non-blocking manner.
Different types of queues in event loop include microtask queue (Promise callbacks), macrotask queue (setTimeout, setInterval callbacks), and animation frame queue
Virtual DOM is a lightweight copy of the actual DOM, used to improve performance by minimizing direct manipulation of the real DOM.
Virtual DOM is a concept used in frameworks like React to optimize rendering performance.
Changes are first made to the virtual DOM, which is then compared to the real DOM to identify the minimal updates needed.
This approach reduces the number of actual DOM manipulations, resulting in faster...
Data structure related question
To find the second highest integer in an array, sort the array in descending order and return the second element.
Sort the array in descending order
Return the second element in the sorted array
Handle edge cases like duplicates or small arrays
based on 1 interview
Interview experience
Senior Software Engineer
10
salaries
| ₹13 L/yr - ₹32 L/yr |
Lead Engineer
8
salaries
| ₹19 L/yr - ₹41 L/yr |
Principal Engineer
7
salaries
| ₹33.2 L/yr - ₹47 L/yr |
Lead Software Engineer
6
salaries
| ₹23.5 L/yr - ₹47 L/yr |
Softwaretest Engineer
5
salaries
| ₹3.6 L/yr - ₹17.8 L/yr |
Oracle
Amdocs
Automatic Data Processing (ADP)
24/7 Customer