Video summary
Epam - Round 1 | Coding Rd | Java, Microservices, Spring Boot, Design Pattern, Kafka, AWS, SQL/JPA
Main summary
Key takeaways
Technical Summary (Coding + Java Interview Round)
1) Coding Tasks & Review Feedback
Problem 1: Binary Search (search algorithm)
- Assumes a sorted list/array and a target value.
- Common debugging issues encountered:
- Missing/incorrect semicolon
- Spelling mistakes
- Undefined output/printing (e.g., result not printed)
- Midpoint calculation discussion
- Candidate used a form like:
mid = left + right - left / 2(or similar). - Interviewer corrected it to the simpler approach:
mid = (left + right) / 2.
- Candidate used a form like:
- Mentions integer division behavior using even/odd range examples.
Problem 2: Java Streams with Nested Collections (count items across transactions)
- Goal: Given
transactions, where each transaction contains a list of items, count how many items match IDs 1/2/3 across all transactions. - Candidate tried Streams +
flatMap, but needed guidance:- If
transactionis a custom object,flatMapmust be applied to the correct internal list (e.g.,transaction.getItems()). - Explanation of
flatMap:transaction.stream()yields a stream of transactions (single transaction), soflatMapshould flatten the transaction’s items list into a stream of items.
- If
- Type correction:
count()returns along, so the pipeline/result type must match.
- Final guidance from the interviewer:
- Apply
flatMapto item lists first, thenfilter, thencount, then print.
- Apply
2) Java OOP Concepts (Encapsulation, Immutability, Abstraction, Polymorphism)
Encapsulation
- Use of access modifiers (e.g.,
private,public) to hide internal state. - Uses object instantiation to provide controlled access to class functionality.
Immutability
- Candidate asked for an immutable class example.
- Mentioned: “no need of getters/setters” (implying immutability by preventing state changes).
Abstraction
- Defined as hiding implementation details while exposing behavior.
- Mentioned use of access modifiers and abstraction through interfaces/abstract classes.
Runtime Polymorphism
- Discussed as polymorphism resolved at runtime (highlighted the term “runtime”).
3) Interfaces vs Abstract Classes
- Abstract class
- Supports mandatory implementation via abstract methods
- Subclasses extend it to fill in required behavior
- Interface
- Can include default and static methods
- Provides flexibility without enforcing a specific inheritance structure
- Mentions an improvement tied to design principles like single responsibility / “limit functionality.”
4) Comparable vs Comparator
Comparable- Implemented by the class itself
- Used for natural ordering (single primary sorting strategy)
Comparator- Provided externally to sorting logic
- Enables multiple sorting strategies without changing the class
5) HashSet Time Complexity Discussion
- Focused on the complexity of the
HashSetadd operation. - Candidate stated:
- Best case: O(1)
- Worst case: O(1) (likely incorrect/misstated)
- Interviewer asked for best/worst complexity.
- Discussion included:
- Hash collisions
- Conceptual collision handling (e.g., linked list behavior)
6) List vs Set
- Set
- Used when you need unique elements
- List
- Used when you need ordering and duplicates are allowed
7) ConcurrentHashMap Internal Working
- Interviewer asked about the internal concurrency mechanism.
- Candidate response included:
- Locking at the bucket/segment level, not the whole map
- Only the relevant segment is locked for updates
- Other segments can support reads/updates concurrently
- Concurrent modification handled via segment-level locking
8) Java Memory Management: Java 7 vs Java 8
- Java 7:
- Mentioned “per-generation” style differences; metaspace/per-region concepts referenced loosely.
- Java 8:
- Introduced/uses Metaspace (replacing older PermGen)
- Described loosely as “better searchable/compactable space” (implementation detail not fully precise)
9) Callable vs Runnable
Runnable- No return value
Callable- Returns a result
- Supports more flexible execution patterns
- Candidate referenced “chaining/apply-style flexibility” (likely higher-order patterns)
10) Stream API: flatMap and Functional Interfaces
flatMap- Used to flatten nested streams/collections (e.g., stream of lists into one stream)
- Functional interfaces mentioned:
FunctionPredicateBinaryOperator
- Candidate also listed common stream-related functional interfaces and functions.
Main Speakers / Sources
- Interviewer / panel
- Asked questions, corrected code, guided Java Streams and concept answers
- Candidate / participant
- Wrote code and answered questions on OOP, JVM, and concurrency
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.