总的面试时间是一个小时,面我的是两个白人大叔,人都还算是nice,不过2对1就是有点车轮战的感觉。。。 下面直接上干活:

  1. Why BB
  2. Why Software Engineer
  3. What is hashtable? How to resolve the collision?
  4. Difference between C and C++
  5. How to mimic Class in C++ using C (especiallythe private part)
  6. Find out the maximum average of 30 numbers givena sequence of number
  7. Follow up: how to make it able to deal with realtime data?
  8. Logic question: given a scale, how to tell thedifferent one from 12 balls or something (using the minimum times of comparison)
  9. Chatting about projects on the resume

卖车票,n个车票窗口,每个窗口里有a_i张票,票价和窗口内剩的票数一样。需要卖掉m张票。问卖m张票得到的最多的总钱数(max profit)

这道题是不是用priority Queue啊?Maxheap

海量live stream的数字,求median