Skip to content

Commit 9660c82

Browse files
authored
fixed formatting 1376-time-needed-to-inform-all-employees.js
1 parent 48bb5a7 commit 9660c82

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

javascript/1376-time-needed-to-inform-all-employees.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
var numOfMinutes = function(n, headID, manager, informTime) {
1212

1313
const tree = {};
14-
for(let i = 0; i < manager.length; i++) {
14+
for (let i = 0; i < manager.length; i++) {
1515

16-
if(manager[i] === -1) continue;
16+
if (manager[i] === -1) continue;
1717

1818
const senior = manager[i];
1919
const junior = i;
2020

21-
if(!tree[senior]) {
21+
if (!tree[senior]) {
2222
tree[senior] = [];
2323
}
2424

@@ -28,14 +28,14 @@ var numOfMinutes = function(n, headID, manager, informTime) {
2828

2929
let time = 0;
3030
const dfs = (node, totalTime) => {
31-
if(tree[node] === undefined) {
31+
if (tree[node] === undefined) {
3232
time = Math.max(time, totalTime);
3333
return;
3434
}
3535

3636
const subordinates = tree[node];
3737

38-
for(let i = 0; i < subordinates.length; i++) {
38+
for (let i = 0; i < subordinates.length; i++) {
3939
const subordinate = subordinates[i];
4040
dfs(subordinate, totalTime + informTime[node]);
4141
}

0 commit comments

Comments
 (0)