Skip to content

Commit 867a08d

Browse files
committed
Markdown Documentation Comments
1 parent bf020ac commit 867a08d

File tree

2 files changed

+44
-40
lines changed

2 files changed

+44
-40
lines changed

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

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,29 @@
99
import org.junit.jupiter.api.Disabled;
1010
import org.junit.jupiter.api.Test;
1111

12-
/**
13-
* Returns a map where each department is mapped to a list of employee names belonging to that
14-
* department.
15-
*
16-
* <p>Example:
17-
*
18-
* <pre>
19-
* Input: [
20-
* Employee("John", "Sales"),
21-
* Employee("Alice", "Marketing"),
22-
* Employee("Bob", "Sales"),
23-
* Employee("Charlie", "IT")
24-
* ]
25-
* <br>
26-
* Output: {
27-
* "Sales" : "John", "Bob",
28-
* "Marketing" : "Alice",
29-
* "IT" : "Charlie"
30-
* }
31-
* </pre>
32-
*/
12+
/// Returns a map where each department is mapped to a list of employee names belonging to that
13+
/// department.
14+
///
15+
/// ### Example:
16+
///
17+
/// ### Input:
18+
/// ```json
19+
/// [
20+
/// Employee("John", "Sales"),
21+
/// Employee("Alice", "Marketing"),
22+
/// Employee("Bob", "Sales"),
23+
/// Employee("Charlie", "IT")
24+
/// ]
25+
/// ```
26+
///
27+
/// ### Output:
28+
/// ```json
29+
/// {
30+
/// "Sales" : "John", "Bob",
31+
/// "Marketing" : "Alice",
32+
/// "IT" : "Charlie"
33+
/// }
34+
/// ```
3335
class E_EmployeesBelongToEachDept {
3436
@Test
3537
@Disabled

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

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,27 @@
88

99
class F_ManagerWithMaxEmployees {
1010

11-
/**
12-
* Returns the manager with the maximum number of employees.
13-
*
14-
* <p>This method takes a list of employees as input, groups them by their managers, and returns
15-
* the manager with the most employees.
16-
*
17-
* <p>Example:
18-
*
19-
* <pre>
20-
* Input: [
21-
* Employee("John", "Alice"), // John's manager is Alice
22-
* Employee("Bob", "Alice"), // Bob's manager is Alice
23-
* Employee("Charlie", "David"), // Charlie's manager is David
24-
* Employee("David", null) // David has no manager
25-
* ]
26-
* <br>
27-
* Output: "Alice" (since Alice has 2 employees: John and Bob)
28-
* </pre>
29-
*/
11+
/// Returns the manager with the maximum number of employees.
12+
///
13+
/// Given a list of employees as input, groups them by their managers, and returns
14+
/// the manager with the most employees.
15+
///
16+
/// ### Example:
17+
///
18+
/// #### Input:
19+
/// ```json
20+
/// Employee("John", "Alice"), // John's manager is Alice
21+
/// Employee("Bob", "Alice"), // Bob's manager is Alice
22+
/// Employee("Charlie", "David"), // Charlie's manager is David
23+
/// Employee("David", null) // David has no manager
24+
/// ```
25+
///
26+
///
27+
/// #### Output:
28+
/// ```json
29+
/// "Alice"
30+
/// ```
31+
/// Explanation: (since Alice has 2 employees: John and Bob)
3032
@Test
3133
@Disabled
3234
void findManagerWithMaxEmployeesTest() {

0 commit comments

Comments
 (0)