Sum Up Tree/Sub-Tree Values – Compute Employee Importance via DFS or BFS
You are given a data structu re of employee information, which includes the employee’s unique id, his importance value and his direct subordinates’ id. For example, employee 1 is …