MCPcopy Create free account
hub / github.com/Ainevsia/Leetcode-Rust / numOfMinutes

Method numOfMinutes

Weekly Contest 179/p3/Solution.cpp:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 }
24
25 int numOfMinutes(int n, int headID, vector<int>& manager, vector<int>& informTime) {
26 subo.resize(n, vector<int>());
27 info_time.assign(informTime.begin(), informTime.end());
28
29 for (int i=0; i<n; i ++)
30 if (manager[i] != -1)
31 subo[manager[i]].push_back(i);
32 /* this is called `Adjacency list` */
33 // dfs can use recursive, do not need stack
34 return dfs(headID);
35 }
36};
37
38int main() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected