Skip to content

Commit ce6ef68

Browse files
committed
Add documentation to B_MaxSalaryInEachDept.java
1 parent 8ead404 commit ce6ef68

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/test/java/com/github/streams/interview/problems/employee/D_NumberOfEmployeeInEachDept.java

+20
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@
77
import org.junit.jupiter.api.Disabled;
88
import org.junit.jupiter.api.Test;
99

10+
/**
11+
* Calculation of the number of employees in each department. <br>
12+
*
13+
* <pre>
14+
* Input:
15+
* Employee("John", "Sales", 50000)
16+
* Employee("Jane", "Marketing", 60000)
17+
* Employee("Bob", "Sales", 70000)
18+
*
19+
* Output:
20+
* {
21+
* "Sales": 2,
22+
* "Marketing": 1
23+
* }
24+
* </pre>
25+
*
26+
* Explanation: This method takes a list of employees as input, groups them by their department
27+
* names, and returns a map where the keys are the department names and the values are the number of
28+
* employees in each department.
29+
*/
1030
class D_NumberOfEmployeeInEachDept {
1131
@Test
1232
@Disabled

0 commit comments

Comments
 (0)