来源:有个猎头去年就在linkedin上联系我,发了好几个邮件和消息,当时我还没想跳槽,今年想跳的时候就没找人内推,还是直
接找了他,他帮我联系了公司的HR,然后和HR聊了聊约了电面,面的是general的sde
电面形式:45分钟电话面试,Google doc上写code,不需要编译
题目:
和 https://leetcode.com/problems/random-pick-with-weight/ 很类似的题,先写了一遍最直接的只pick一次,follow up是pick k次再写了一遍,用TreeMap或者binary search都
行,分析了时间空间复杂度,运气比较好考的题挺简单的
参考 https://www.cnblogs.com/grandyang/p/9784690.html
时间有多就又问了一题,只说了思路
Parallel Job Scheduling
There are N processes with some processes having dependencies on other processes (meaning if a process P1 is dependent on process P2, then P1 can only be started after P2 is complete). Assume that there won’t be a cyclic dependency in the inputs.
Each process has a time duration (in sec) given by Duration array.
Processes can be run in parallel. We need to find the minimum time such that all processes are completed.
TestCase:
There are 4 processes -
A (Duration: 2 sec), B (Duration: 3 sec), C (Duration: 4 sec) and D (Duration: 5 sec)
B is dependent on A
C is dependent on A
D is dependent on B & C
In this case, min time would be 11 sec.
感受:面试官是白人,虽然有就是来完成任务的感觉,一开始自我介绍也没说,但很容易交流也很友好,面试过程中很focus,后来他说自己是return intern,表示来狗家的最大原因是看重wlb
结果:过了两天通知可以去加州onsite了,但不知道这个时候还有没有HC,去面完了再看吧