Skip to content

Commit 569e323

Browse files
refactor 690
1 parent b47f3cb commit 569e323

File tree

1 file changed

+0
-27
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-27
lines changed

src/main/java/com/fishercoder/solutions/_690.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,6 @@
55
import java.util.List;
66
import java.util.stream.Collectors;
77

8-
/**
9-
* 690. Employee Importance
10-
*
11-
* You are given a data structure of employee information, which includes the employee's unique id,
12-
* his importance value and his direct subordinates' id.
13-
* For example, employee 1 is the leader of employee 2, and employee 2 is the leader of employee 3.
14-
* They have importance value 15, 10 and 5, respectively.
15-
* Then employee 1 has a data structure like [1, 15, [2]], and
16-
* employee 2 has [2, 10, [3]], and employee 3 has [3, 5, []].
17-
* Note that although employee 3 is also a subordinate of employee 1, the relationship is not direct.
18-
* Now given the employee information of a company, and an employee id,
19-
* you need to return the total importance value of this employee and all his subordinates.
20-
21-
Example 1:
22-
23-
Input: [[1, 5, [2, 3]], [2, 3, []], [3, 3, []]], 1
24-
Output: 11
25-
Explanation:
26-
Employee 1 has importance value 5, and he has two direct subordinates: employee 2 and employee 3.
27-
They both have importance value 3. So the total importance value of employee 1 is 5 + 3 + 3 = 11.
28-
29-
Note:
30-
31-
One employee has at most one direct leader and may have several subordinates.
32-
The maximum number of employees won't exceed 2000.
33-
34-
*/
358
public class _690 {
369

3710
public static class Solution1 {

0 commit comments

Comments
 (0)