Video summary
Epam - Round 1 | Coding Round | Java, Microservices, Spring Boot, Design Pattern, Kafka, SQL, JPA
Main summary
Key takeaways
Main ideas, concepts, and lessons conveyed
1) Java version and baseline for the interview
- The interviewer asks which Java version the candidate uses on their current project.
- The candidate states they use Java 17.
- A discussion references one task related to Java 8, and the interviewer asks about the candidate’s experience with Java 8.
2) SOLID principles (theoretical discussion)
The interviewer asks for brief explanations of SOLID. The candidate describes each principle with an emphasis on separating responsibilities for clean design.
-
S — Single Responsibility Principle (SRP)
- A class should have one designated responsibility.
- Avoid mixing concerns (e.g., repository logic shouldn’t be inside a service).
- Keep repository and service responsibilities in separate classes/modules.
- Abstraction/interfaces can help organize responsibilities.
-
O — Open/Closed Principle (OCP)
- Entities should be open for extension but closed for modification.
- Supports reusability while adding behavior without breaking existing code.
-
L — Liskov Substitution Principle (LSP)
- If an interface/parent type is implemented by multiple types, they should be interchangeable.
- Replacing one implementation with another should not break correctness.
-
I — Interface Segregation Principle (ISP)
- Don’t force one interface to represent multiple unrelated responsibilities.
- Prefer smaller, focused interfaces so only relevant groups implement the needed methods.
-
D — Dependency Inversion Principle (DIP)
- High-level logic should not depend directly on concrete implementations.
- Dependency management should be handled by the container (e.g., Spring), not by application code directly instantiating classes.
- Emphasizes runtime injection/bean management via context/container.
3) Coding Round Task 1 — Employee processing with Java Streams
A coding exercise is introduced:
- Goal: Process a list of employees using the Java Stream API.
- Employee class requirements: fields ID, name, salary; include a constructor and getters.
- Initial list: create a list with 3 employees (as suggested by the interviewer).
Subtasks
- Print names of employees whose salary > 5000.
- Create a new list of employees where each employee’s salary is increased by 10%.
- Find the employee with the highest salary (details implied via use of
Optional).
Methodological points and corrections during implementation
-
The candidate uses
Optionalwith stream methods likefindFirst.- The interviewer asks why
Optionalis used. - The candidate explains that
Optionalhelps avoid NullPointerException and supports safe handling (somewhat generally viaof/ofNullable-style reasoning).
- The interviewer asks why
-
For the salary increase task, the interviewer corrects a type mismatch:
- The requirement is
List<Employee>, but the candidate’s transformation led towardList<Double>. - Guidance: use a block
map(lambda body) to update the employee (set new salary) and return the employee object for collection. - The interviewer also comments on stream chaining—ensuring correct sequencing and avoiding syntax/logic issues when combining operations.
- The requirement is
Stream API conceptual clarification (asked by the interviewer)
-
Intermediate vs terminal operations
- Intermediate operations: build/transform streams (e.g.,
filter,map,flatMap) and do not produce final output by themselves. - Terminal operations: finalize the stream and produce a result/output (e.g.,
forEach,collect,find*,reduce,anyMatch/short-circuiting operations).
- Intermediate operations: build/transform streams (e.g.,
-
Lazy evaluation
- Intermediate operations are applied lazily and only execute when a terminal operation is invoked.
4) Coding Round Task 2 — Smallest missing positive integer
Second coding exercise:
- Input: an array of integers (may contain duplicates, may be unsorted).
- Output: the smallest positive integer (> 0) that is missing from the array.
Key cases discussed
- Example reasoning:
- If the array contains
1, 2, 3, 4, 6, the answer is 5.
- If the array contains
- Zero is ignored because the requirement is positive (> 0).
- Negative numbers are ignored:
- Example discussed: even if
-1, -3exist, the answer depends only on positive missing values.
- Example discussed: even if
- Duplicates are allowed (set-based deduplication is acceptable).
- One example note:
- If
1is present, you return the next smallest missing positive (not1).
- If
Approach
- The candidate proposes using a
Setto:- remove duplicates,
- ignore negatives,
- then compute the smallest missing positive.
- The interviewer approves this direction.
5) Data structures theory questions
HashMap — internal workings
The interviewer asks how HashMap works internally. The candidate covers:
HashMapstores key-value pairs.- Uses a hashing function to compute a hash code.
- Converts the hash code into a bucket index (mentions patterns like
n - 1and initial behaviors such as a “bucket size 16”). - Handles collisions using bucket placement and
equalschecks. - Mentions that
HashMapallows one null key (mapped to a first bucket). - Notes that custom objects may provide their own hash implementation; Java provides hashing for primitives/wrappers.
List implementations — ArrayList vs LinkedList
The interviewer asks differences between:
-
ArrayList
- Backed by a contiguous memory model.
- Dynamic resizing (grows when filled; candidate mentions initial ~10 and growth behavior like ~50%).
- Fast index access and search via indexes.
- Slower insertions/deletions in the middle due to shifting elements.
-
LinkedList
- Uses a non-contiguous/discrete memory approach.
- Nodes connected via pointers/references to next nodes.
- Better insertion/deletion when you already have the node position.
- Slower index-based access because traversal is required (memory overhead and traversal cost noted).
6) Cloud/AWS hiring feedback
- The candidate asks what the “hiring” relates to (“Java”/project context).
- HR indicates they don’t have full details, but:
- The interviewer suggests it relates to the AWS Pool.
- The candidate should be prepared for theoretical questions about AWS/cloud in the next interview.
- The interviewer indicates the next interview will be more theoretical and more focused on experience/project discussion.
Detailed instruction-like steps shown for coding tasks
Task 1: Employee processing with Streams
-
Define
Employeeclass- Fields:
id,name,salary - Include a constructor and getters.
- Fields:
-
Create initial list of employees
- Example size: 3 employees.
-
Subtask A: print names where salary > 5000
- Use
filterforsalary > 5000. - Use
mapto extract names (or print directly). - Use a terminal operation to output (e.g.,
forEach).
- Use
-
Subtask B: increase salary by 10%
- Transform each
Employeeinto an updated employee:- increase salary by 10% (e.g., multiply by
1.1).
- increase salary by 10% (e.g., multiply by
- Ensure the output is
List<Employee>(notList<Double>). - Use
mapwith a block body if needed:- update salary (e.g., via setter/logic),
- then return the employee.
- Collect into a new list using
collect(...).
- Transform each
-
Subtask C: find the employee with the highest salary
- Use a stream max/finding operation based on salary.
- Handle the result safely (interviewer references
Optionalandfind*behavior).
-
Stream concepts to follow
- Build the pipeline with intermediate operations (
filter,map). - Trigger evaluation with a terminal operation (
collect,forEach,find*). - Remember lazy evaluation: intermediate operations execute only after a terminal operation.
- Build the pipeline with intermediate operations (
Task 2: Smallest missing positive integer
- Input: integer array (may have duplicates, negatives, unsorted).
- Ignore: all values
<= 0. - Deduplicate: use a
Setto remove duplicates. - Compute smallest missing positive:
- Starting from
1, return the first positive integer not present in the set.
- Starting from
Speakers / sources featured
- Interviewer / HR interviewer (main speaker)
- Leads questions, asks SOLID/stream/data-structure questions, and reviews coding.
- Candidate (main speaker)
- Answers SOLID questions and codes/explains stream/data-structure solutions.
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.