Akuna Python Phone Interview 挂经

上周刚面的akuna python dev的position。 OA挺容易的 特别是编程题。比较难的就是几道选择题,可以看看地理的一些面经。我记得好像还考了几道Operating System的题,还没上过OS所以直接不会就乱猜。结果还有phone interview。

电话感觉有点难。感觉他们要的是一个python特厉害的编程员。而且面我的三哥的英语很难听得懂,挂完电话就感觉肯定会被挂了。本来就没特想去akuna, 打算用他来negotiate另一个公司,现在也没办法了。

发发面经 攒攒人品吧 希望能帮到大家。

  • Encapsulation vs abstraction

  • Deep copy vs shallow copy. 给几个例子。 然后问了几个比较细的问题

    -A = [1,2,3]; B = copy(A); B[0] = 100; what’s A?

    -A = [(1,2,3),(1,2,3)]; B = copy(A); B[0] = (20,30); what’s A?

  • Explain with keyword in python. Followup:how to use with statement for a class:

    -If you create a new object and you want to say with Person() as p, what doyou have to do? => 答案就是你需要在那个class override __enter____exit__ 两个functions。答出来了但感觉他听了就没什么回应。

    -Do you need try and except blocks inside with statements? If you there is anerror in your with blocks, would it throw an exception if you don’t have tryexcept blocks?

  • Garbage collection: How does garbagecollection work in python? When would reference counting not work? 我说 when you have cyclic references like a doubly linkedlist.

  • Generator and yield. What is a generator?Followup: If you exhaust all the elements in the generator and you call .next()what would the generator do?

  • If your function’s default parameter is amutable type, what can go wrong? e.g. def hello(name=[]) => 这个比较难。我也不知道。

  • explain decorators. Give specificexamples.


差不多7 business days

那个你没答出来的问题可以见这里的"Mutable Default Arguments":

唉不过他们也没给我发phone interview说人满了……