【通知】7月22,工业界资深数据科学家教你破解各大公司面试!


一亩三分地论坛

 找回密码
 获取更多干活,快来注册

一亩三分地官方iOS手机应用下载
查看: 467|回复: 1
收起左侧

Drive.AI SDE OA两题

[复制链接] |试试Instant~ |关注本帖
lijiyao111 发表于 2017-6-12 21:56:44 | 显示全部楼层 |阅读模式

2017(1-3月) 码农类 博士 全职@Drive.AI - 网上海投 - 在线笔试 |Other在职跳槽

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

您需要 登录 才可以下载或查看,没有帐号?获取更多干活,快来注册

x
说一下他家的OA,两题, 两小时time limit。. from: 1point3acres.com/bbs
第一题简单, merge two sorted array, in place.
第二题有些难,类似topological sort,但又不一样。
. Waral 鍗氬鏈夋洿澶氭枃绔,
# Description:
. 1point 3acres 璁哄潧
In Docker, building an image has dependencies. An image can only be built once its dependency is built (If the dependency is from outside, then the image can be built immediately).

Sometimes, engineers make mistakes by forming a cycle dependency of local images. In this case, ignore the cycle and all the images depending on this cycle.

Input is vector of pair of images (image, its dependency).
. 涓浜-涓夊垎-鍦帮紝鐙鍙戝竷
Output the order of images to be built in order.. 1point 3acres 璁哄潧

##Example:
```
Example 1:
{{"master", "ubuntu"}, {"numpy", "master"}, {"tensorflow", "numpy"}}
Output: master, numpy, tensorflow

Example 2:
{{"python", "numpy"}, {"numpy", "python"}, {"tensorflow", "ubuntu"}}
Output: tensorflow

Example 3:
{{"b", "c"}, {"c", "d"}, {"a", "b"}, {"d", "e"}, {"e","c"}, {"f", "g"}}
Ouput: f
```


lcq123 发表于 2017-6-30 10:45:12 | 显示全部楼层
关注一亩三分地公众号:
Warald_一亩三分地
请问楼主可不可以用Java
回复 支持 反对

使用道具 举报

本版积分规则

关闭

一亩三分地推荐上一条 /5 下一条

手机版|小黑屋|一亩三分地论坛声明

custom counter

GMT+8, 2017-7-21 09:03

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

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