由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - T onsite一题
相关主题
what is the internal implementation of Deque问一道题(6)
question 2: o(1) euque and dequeue?问个题。
Google经典题目一问一道面试题。
Google second phone interviewfb国内申请的曲折经历+电面
[google面试题] API流量控制问一道算法题,find min in the last k elements
问道G家算法题再问一个blockingqueue的问题
分享下G家第一个phone interview的题目A, A, G, G, L, C, Z, U 面经 + offer
f 的面经G家,请问这样的面试表现拿到offer的几率如何?
相关话题的讨论汇总
话题: server话题: yes话题: 个数话题: 一题话题: queue
进入JobHunting版参与讨论
1 (共1页)
f********a
发帖数: 165
1
server连续的接受到yes和no,当我们查询server的时候,返回以前的某一个小时最多的
yes个数。一个一个小时的time slot从server start算起。貌似要考虑多线程。 我想
法是用一个queue,每当接受到一个yes,检查时间,从queue里面pop出超过一个小时的
yes,然后比较这时queue的size和最大个数,如果大就更新最大个数. 我用c++,
multithreading写起来费力,因为查询的时候貌似要stop server? 那位大侠说说。
l*n
发帖数: 529
2
Server自己不能计数吗?能计数的话直接存每个slot的yes/no个数就行了。让server保
持一个记录所有individual yes/no的数组然后让你deque感觉没意义。
1 (共1页)
进入JobHunting版参与讨论
相关主题
G家,请问这样的面试表现拿到offer的几率如何?[google面试题] API流量控制
关于Bloomberg Phone Interview问道G家算法题
电面问题分享下G家第一个phone interview的题目
这道题, 到底怎么做?f 的面经
what is the internal implementation of Deque问一道题(6)
question 2: o(1) euque and dequeue?问个题。
Google经典题目一问一道面试题。
Google second phone interviewfb国内申请的曲折经历+电面
相关话题的讨论汇总
话题: server话题: yes话题: 个数话题: 一题话题: queue