Filter interviews by
Java Stream API allows functional-style operations on collections, enabling efficient data processing.
Streams can be created from collections, arrays, or I/O channels. Example: List<String> names = Arrays.asList('Alice', 'Bob'); Stream<String> stream = names.stream();
Common operations include filter, map, and reduce. Example: List<Integer> lengths = names.stream().map(String::length).collect(Coll...
Find the longest common prefix among an array of strings efficiently.
Use a vertical scanning approach: Compare characters of each string at the same index.
Example: For ['flower', 'flow', 'flight'], the common prefix is 'fl'.
If any string is empty, the longest prefix is also empty.
Consider edge cases: For ['dog', 'racecar', 'car'], the longest prefix is '' (no common prefix).
Creating a form in React.js involves using controlled components and managing state effectively.
Use functional components with hooks like useState for managing form state.
Example: const [name, setName] = useState('');
Handle form submission with an onSubmit event handler.
Example: <form onSubmit={handleSubmit}>...</form>
Validate inputs before submission to ensure data integrity.
Example: Check if fields a...
Rearranging a string involves organizing its characters based on specific criteria, often to meet certain conditions.
Use a frequency map to count occurrences of each character. Example: 'aabbcc' -> {'a': 2, 'b': 2, 'c': 2}.
Sort characters based on frequency or lexicographical order. Example: 'aaabb' can be rearranged to 'ababa'.
Check if rearrangement is possible based on character counts. If the highest frequen...
What people are saying about EPAM Systems
Using Java 8 streams to count frequency of elements in an array of strings
Use Java 8 streams to convert the array to a map with element as key and count as value
Use Collectors.groupingBy and Collectors.counting to achieve this
Example: Arrays.stream(array).collect(Collectors.groupingBy(Function.identity(), Collectors.counting()))
Merging two lists in Java involves combining elements from both lists into a single list, maintaining order and uniqueness.
Use ArrayList for dynamic size: List<String> mergedList = new ArrayList<>(list1); mergedList.addAll(list2);
To remove duplicates, use Set: Set<String> mergedSet = new HashSet<>(list1); mergedSet.addAll(list2); List<String> mergedList = new ArrayList<>(mergedS...
HashMap is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
HashMap is implemented using an array of linked lists, where each element is a key-value pair stored in a Node object.
When a key-value pair is added to the HashMap, the key is hashed to determine the index in the array where the pair will be stored.
If multiple key-value pairs hash to the same index, they are sto...
Implement a SQL query for given examples
Use SELECT statement to retrieve data from tables
Use WHERE clause to filter results based on conditions
Use JOIN clause to combine data from multiple tables if needed
Interface defines a contract for classes to implement, while abstract class provides partial implementation.
Interface can have only abstract methods, while abstract class can have both abstract and concrete methods.
A class can implement multiple interfaces but can only extend one abstract class.
Interfaces are used for achieving multiple inheritance in Java.
Abstract classes are used when some common functionality n...
Java interview questions on OOPS concepts, polymorphism, exceptions, data structures, and threading.
OOPS concepts include encapsulation, inheritance, and polymorphism.
Polymorphism refers to the ability of an object to take on multiple forms.
Singleton class is a class that can only have one instance, while factory method is a method that creates objects.
Exception is an error that occurs during program execution, wi...
I applied via Campus Placement and was interviewed in Nov 2024. There were 4 interview rounds.
2 coding question (1st reverse a string without changing position of special character. 2nd remove elements before '#') + 20 mcqs
How to Improve software development process
Rearranging a string involves organizing its characters based on specific criteria, often to meet certain conditions.
Use a frequency map to count occurrences of each character. Example: 'aabbcc' -> {'a': 2, 'b': 2, 'c': 2}.
Sort characters based on frequency or lexicographical order. Example: 'aaabb' can be rearranged to 'ababa'.
Check if rearrangement is possible based on character counts. If the highest frequency ex...
Creating a form in React.js involves using controlled components and managing state effectively.
Use functional components with hooks like useState for managing form state.
Example: const [name, setName] = useState('');
Handle form submission with an onSubmit event handler.
Example: <form onSubmit={handleSubmit}>...</form>
Validate inputs before submission to ensure data integrity.
Example: Check if fields are em...
Find the longest common prefix among an array of strings efficiently.
Use a vertical scanning approach: Compare characters of each string at the same index.
Example: For ['flower', 'flow', 'flight'], the common prefix is 'fl'.
If any string is empty, the longest prefix is also empty.
Consider edge cases: For ['dog', 'racecar', 'car'], the longest prefix is '' (no common prefix).
I appeared for an interview in Dec 2024.
Java Stream API allows functional-style operations on collections, enabling efficient data processing.
Streams can be created from collections, arrays, or I/O channels. Example: List<String> names = Arrays.asList('Alice', 'Bob'); Stream<String> stream = names.stream();
Common operations include filter, map, and reduce. Example: List<Integer> lengths = names.stream().map(String::length).collect(Collector...
Interface defines a contract for classes to implement, while abstract class provides partial implementation.
Interface can have only abstract methods, while abstract class can have both abstract and concrete methods.
A class can implement multiple interfaces but can only extend one abstract class.
Interfaces are used for achieving multiple inheritance in Java.
Abstract classes are used when some common functionality needs ...
Microservices design pattern is an architectural style that structures an application as a collection of loosely coupled services.
Each service is responsible for a specific function and can be developed, deployed, and scaled independently.
Communication between services is typically done through APIs, allowing for flexibility and resilience.
Microservices promote agility, scalability, and maintainability in large and com...
Filter out strings starting with 'a' and convert to uppercase using Streams
Use Stream.filter() to filter out strings starting with 'a'
Use Stream.map() to convert remaining strings to uppercase
Collect the result back into an array using Collectors.toList()
I applied via Campus Placement
Aptitude and coding boyh
Sustainable disaster shelter
Manipulating strings stored in a file using Java
Read the file using FileReader and BufferedReader classes
Use String methods like split(), substring(), replace() to manipulate the strings
Write the modified strings back to the file using FileWriter
Java 8 streams provide a way to process collections of objects in a functional style.
Streams are created from collections using stream() method
Operations like filter, map, reduce can be applied to streams
Terminal operations like forEach, collect are used to process the stream
I applied via Company Website and was interviewed in Jun 2024. There was 1 interview round.
HashMap is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
HashMap is implemented using an array of linked lists, where each element is a key-value pair stored in a Node object.
When a key-value pair is added to the HashMap, the key is hashed to determine the index in the array where the pair will be stored.
If multiple key-value pairs hash to the same index, they are stored i...
I applied via Naukri.com and was interviewed in May 2024. There were 2 interview rounds.
The interviewr was very calm and asked two coding questions one of 25 minutes and one of 15 mintues asked question on java stream and basic questions
Multithreading allows multiple threads to execute concurrently within a single process.
Multithreading improves performance by allowing tasks to run in parallel.
Each thread has its own stack and shares the same heap memory.
Java provides built-in support for multithreading through the Thread class and Runnable interface.
based on 10 interview experiences
Difficulty level
Duration
based on 16 reviews
Rating in categories
Senior Software Engineer
3.7k
salaries
| ₹16.4 L/yr - ₹37.2 L/yr |
Software Engineer
2.2k
salaries
| ₹8.5 L/yr - ₹23.8 L/yr |
Lead Software Engineer
1.1k
salaries
| ₹29.9 L/yr - ₹47 L/yr |
Senior Systems Engineer
390
salaries
| ₹22 L/yr - ₹36.3 L/yr |
Software Developer
366
salaries
| ₹10.2 L/yr - ₹30.5 L/yr |
DXC Technology
Sutherland Global Services
Optum Global Solutions
Virtusa Consulting Services