690. Employee Importance

use HashMap DFS

time: O(n), may cal every Employee

space: O(n)

or use global variable

BFS

我想就認為是 O(n) 吧, n 是全部員工數

or

DFS another

or

Last updated

Was this helpful?