w*s
2 楼
今天碰到同样的问题, 是用在工程上, 而不是面试.
我现在搞了3个list, 记录每次request的time
在每次请求的时候,把time塞入3个list中, 然后再trim掉过期的
在求get_requests_last_hour中,先trim,再返回list.size()
当然还有加锁之类的容易搞.
有没有更好的方法?
我现在搞了3个list, 记录每次request的time
在每次请求的时候,把time塞入3个list中, 然后再trim掉过期的
在求get_requests_last_hour中,先trim,再返回list.size()
当然还有加锁之类的容易搞.
有没有更好的方法?
e*i
4 楼
co-ask. This one puzzled me for a while. Simple solution would be using
circular buffer, but the result will not be very precise unless the rates of
feed are constant.
circular buffer, but the result will not be very precise unless the rates of
feed are constant.
b*g
5 楼
当然可以,cash back 没说一定要用信用卡吧
相关阅读
CS 面试题总结(3)cs/ce刚毕业找sw工作面试准备的建议CS 面试题总结(5)Programming Pearls -7Fresh Graduate 要好好准备电话面试啊~[合集] 我想我FAIL掉了. 题目好难.[合集] master本身就是一种失败找工作经历,并一些问题说说我最牛的面试经历及心得人生第一个offer我当面试官的一点经验和感想:我今年的 H-1B申请经历, ABD分子生物学PhD找工记OPT pending 的筒子们,打电话要趁早啊Fresh CS Phd找公司职位经历找工作总结 MSEE ASIC说说某著名软件公司的onsite面试分享面试过程,积攒RPsome answers for norikowarning for job searcher (转载)