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