回复: 6
跳转到指定楼层
上一主题 下一主题
收起左侧

亚麻OA2贡献数据

全局:

2019(1-3月) 码农类General 硕士 实习@amazon - 网上海投 - 在线笔试  | | Other | 应届毕业生

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x


是之前OA1 DDL2.22那一批, 做了OA1之后,当天收到OA2, 今天做完OA
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
peed版)


求大米,没米寸步难行。。。

评分

参与人数 5大米 +9 收起 理由
shine1210 + 1 赞一个
Mozart + 3 很有用的信息!
贿贿 + 1 很有用的信息!
韩潇 + 3 很有用的信息!
guocongwudi + 1 赞一个

查看全部评分


上一篇:亚麻OA1贡献数据DDL2.22
下一篇:牛弱面经
推荐
 楼主| jennifer666666 2019-3-13 13:45:53 来自APP | 只看该作者
全局:
Mozart 发表于 2019/03/13 09:24:24


请问lz这题目是你手打的吗?还是哪里有资源? 求告知,已加米

地里有截图版本,我只是整理的时候ocr转了一下。
回复

使用道具 举报

🔗
贿贿 2019-3-1 05:10:17 | 只看该作者
全局:
求问楼主 (Software component speed版)是哪版呢?
回复

使用道具 举报

🔗
 楼主| jennifer666666 2019-3-1 06:24:13 | 只看该作者
全局:
贿贿 发表于 2019-3-1 05:10
求问楼主 (Software component speed版)是哪版呢?

Subtree with Maximum Average 有两个版本,区别在于背景故事不一样, 实现几乎是一样的。
回复

使用道具 举报

🔗
贿贿 2019-3-1 06:31:34 | 只看该作者
全局:
jennifer666666 发表于 2019-3-1 06:24
Subtree with Maximum Average 有两个版本,区别在于背景故事不一样, 实现几乎是一样的。

感谢!楼主做的是general tree么 能不能描述一下题目呀?有什么限制吗?
回复

使用道具 举报

🔗
 楼主| jennifer666666 2019-3-1 14:51:52 | 只看该作者
全局:
贿贿 发表于 2019-3-1 06:31
感谢!楼主做的是general tree么 能不能描述一下题目呀?有什么限制吗?

Subtree with Maximum Average(Software component speed版)
------------------------------------------------------------------------------------------------------------------------------
Engineers at Amazon are interested in knowing which software component moves the fastest by counting the number of lines of code changed in that component and all subcomponents in the code base over a month. Component nodes have subcomponent nodes that make up the larger component. We've stored the components as a tree where each node represents one component that contains the number of lines changed that month. Software component speed is computed as the average number of lines of code changed for a given component and all its subcomponents. Engineers compute this software component speed for all such components which have one or more subcomponents. Find the component with the highest software component speed. Assume there will be at least one subcomponent in the tree and that there will be no ties.

Input
The input to the function/method consists of an argument:
rootComponent, representing the root node.

Output
Return the reference to the component that has highest software component speed.

Example
Input:
rootComponent:
           200
       /              \
   120                   180
/  I  \                  /  \
110 20  30         150 80

Output:
180

Explanation: The component at the root of the tree has had 200 lines changed this month; its two dependencies have had 120 and 180 changed respectively. There are three components in this tree with the following changes:
120 => (110+20+30+120)/4 = 70
180 => (180+150+80)/3 =130.67
200 => (110+20+30+120+180+150+80 + 200)/8 = 86.25


评分

参与人数 2大米 +6 收起 理由
Mozart + 3 很有用的信息!
贿贿 + 3 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
Mozart 2019-3-13 09:24:24 | 只看该作者
全局:
jennifer666666 发表于 2019-3-1 14:51
Subtree with Maximum Average(Software component speed版)
---------------------------------------- ...

请问lz这题目是你手打的吗?还是哪里有资源? 求告知,已加米
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表