注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
DRW OA 使用的是codility 平台,一共150min 要完成三道算法题,这个公司更倾向于使用java,所以会要求三道题里至少有一道用java写。考试的时候不要求开摄像头,不用录屏,而且大部分题都可以在网上找到原题,不过会查重,所以需要适当修改。如果能找到原题,时间还是挺充裕的,不过如果找不到,感觉难度不小,有点类似于leetcode 1000 题以后的难度。
第一道 leetcode 1375
第二道 leetcode1466
第三道
Merging a sorted list consisting of K elements with a sorted list consisting of L elements takes (K + L) milliseconds(ms). The time required to merge more than two lists into one final list depends on the order in which the merges are performed.
For example, consider the following three lists:
list P consisting of 100 elements,
lisree elements such that:
A[0] = 100 A[1] = 250 A[2] = 1000
the function should return 1700, as explained above.
Write an efficient algorithm for the following assumptions:
N is an integer within range [0..10,000];
each element od array A is an integer within the range [1..1,000]
|