注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
两道题 + hirevue讲思路
一道lc202 happy number
另一道和lc399类似
A company wants to track change in their organization by knowing how many levels exist between any two employees. This number will help them know who is being promoted and who is not.
For example:
If Susan reports to John and John reports to Amy. Then, John/Amy
Output:
The number of levels between the pair requested, including the top manager's level. In the example above, the Output should be: 2
新人求加米~~ |