a****n 发帖数: 26 | 1 Given a company structure where every employee reports to a superior, all
the way up to the CEO,
how would you print out all the employees that a particular individual
oversees?
Write a method that implements this, given the below:
//Employee object contains a string denoting the employee name, and an //
array containing employees who report to this employee
Employee {
String name;
Array employees;
}
求思路,感觉不应该是binary tree. | l**s 发帖数: 421 | | h*********o 发帖数: 230 | 3
【在 l**s 的大作中提到】 : DFS
| m*****n 发帖数: 2152 | 4 这是一个多叉树阿。
【在 a****n 的大作中提到】 : Given a company structure where every employee reports to a superior, all : the way up to the CEO, : how would you print out all the employees that a particular individual : oversees? : Write a method that implements this, given the below: : //Employee object contains a string denoting the employee name, and an // : array containing employees who report to this employee : Employee { : String name; : Array employees;
| m*****g 发帖数: 71 | |
|