Careercup - Google面试题 - 5680330589601792
2014-05-08 23:18
原题:
If you have data coming in rapid succession what is the best way of dealing with redundant data?
题目:如果你有大量数据流入,如何处理冗余数据?
解法:又是“Guy”出的题,题意不清,没有情景。神马意思?做个Cache吧。
代码:
// http://www.careercup.com/question?id=5680330589601792
// Answer:
// If the server is being flooded by huge succession of queries, a must-do is caching. Maybe LRU, maybe automatically adjusted by other conditions.
// The caching is based on some kind of hashing, with the digital sign of the query as the hash key. The query result is cached inside.
int main()
{
return ;
}
Careercup - Google面试题 - 5680330589601792的更多相关文章
- Careercup - Google面试题 - 5732809947742208
2014-05-03 22:10 题目链接 原题: Given a dictionary, and a list of letters ( or consider as a string), find ...
- Careercup - Google面试题 - 5085331422445568
2014-05-08 23:45 题目链接 原题: How would you use Dijkstra's algorithm to solve travel salesman problem, w ...
- Careercup - Google面试题 - 4847954317803520
2014-05-08 21:33 题目链接 原题: largest number that an int variable can fit given a memory of certain size ...
- Careercup - Google面试题 - 6332750214725632
2014-05-06 10:18 题目链接 原题: Given a ,) (,) (,), (,) should be returned. Some suggest to use Interval T ...
- Careercup - Google面试题 - 5634470967246848
2014-05-06 07:11 题目链接 原题: Find a shortest path ,) to (N,N), assume is destination, use memorization ...
- Careercup - Google面试题 - 5424071030341632
2014-05-08 22:55 题目链接 原题: Given a list of strings. Produce a list of the longest common suffixes. If ...
- Careercup - Google面试题 - 5377673471721472
2014-05-08 22:42 题目链接 原题: How would you split a search query across multiple machines? 题目:如何把一个搜索que ...
- Careercup - Google面试题 - 6331648220069888
2014-05-08 22:27 题目链接 原题: What's the tracking algorithm of nearest location to some friends that are ...
- Careercup - Google面试题 - 5692127791022080
2014-05-08 22:09 题目链接 原题: Implement a class to create timer object in OOP 题目:用OOP思想设计一个计时器类. 解法:我根据自 ...
随机推荐
- 3D模型文件读写.Net SDK
AnyCAD .Net/C++ SDK支持多种3D/2D文件格式,比如BREP.STEP.IGES.STL.DXF.3DS.OBJ.FBX.SKP.IFC.DAE……等,根据使用场景提供不同的API. ...
- MBR解析
先推广一下QQ群:61618925.欢迎各位爱好编程的朋友加入. 一.程序界面 二.关键部分代码: 1.数据结构定义 #define MBRSIZE 512 #define BOOTRECORDSIZ ...
- .net4.0注册到IIS
IIS和.netfw4.0安装顺序是从前到后,如果不小心颠倒了,无所谓. 打开程序-运行-cmd:输入一下命令重新注册IIS C:\WINDOWS\Microsoft.NET\Framework\v4 ...
- jQuery bind and unbind (绑定和解除)
测试:页面代码: <body> <input type="button" name="aaa" value="点击我"&g ...
- angularJS 数组更新时重新排序之解决方案一:这个坑,绕开吧,不跳了……
今天产品大人发现了一bug,图表数据和数据库总是对不上,原因是当前端更新数组时,angularJS默认对数组进行了排序. // 点击事件:input复选框 $scope.fnClickUpdateAr ...
- Linux文件系统的主要目录结构说明及分区方案
Linux操作系统有一些固定的目录.各种Linux发行版的目录结构虽然不会一模一样,但是不会有很大差异.知道了这些目录的作用,不仅对你进行磁盘分区规划很有帮助,而且会让你以后的日常维护工作变得轻松.只 ...
- PHP 实现下载文件到本地
只需要在php文件中设置请求头就可以了,创建download.php文件,代码如下: $fileName = $_GET['filename']; //得到文件名 header( "Cont ...
- WordPress默认栏目设置
WordPress是一个注重美学.易用性和网络标准的个人信息发布平台,是全球使用最多的博客系统,只需要在系统后台做一些简单的设计,基本就能实现我们日常个性化发布个人信息的需求,而博客后台的使用其实很简 ...
- setting菜单界面的形成--未优化
代码: first_preference.xml: <?xml version="1.0" encoding="utf-8"?> <Prefe ...
- 百度 迷你版 UMeditor富文本编辑器 使用方法
第一步:下载编辑器 到官网下载 umeditor 最新版源码版本,下载之后打开 _examples/index.html 就可以看到演示例子.[下载页面] 第二步:部署编辑器到页面 解压下载的包,放到 ...