Google 电面

原帖地址:一亩三分地

因为之前一直不知道一亩三分地这个论坛,所以这个3月份电面的题大家就看看参考好了。

1st Question:
Given a content of a book, get the most freq word in the content

2st Question:
Given these operations:
Update triplets:
<”set_manager”, “A”, “B”>: indicates that A is the direct manager of B
<“set_peer”,”A”, “B”>: indicates that A and B have the same direct manager

<”set_manager”, “A”, “B”>: indicates that A is the direct manager of B
Query triplet:
<“query_manager”,”A”, “B”>: print true/false A is in the management chain of B

Design Data Structure which implements these operations.