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思想设计一个计时器类. 解法:我根据自 ...
随机推荐
- C#基础-ref、out
1.默认情况下,C#假定所有的方法参数传递都是传值的. 如下面的方法: public static void Main(string[] args) { int val = 5; //调用AddVal ...
- Linux搭建NFS提供磁盘给Windows使用
在Windows2008系统下设置挂载Linux服务器磁盘 一.系统环境 系统平台:CentOS release 5.8 (Final) NFS Server IP:X....X...153.157 ...
- LINUX下网站压力测试工具webbench
wget http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz tar zxvf webbench-1.5.tar.gz cd we ...
- T—SQL用法剪辑,方便以后查看
一.用T-SQL查询表中第n行到第m行数据的写法示例 假设这里的n=6,m=10则有以下两种写法,qusID可以不连续,如下: select top 5 * from tb_wenti where q ...
- SQLite开发工具
Sqlite 管理工具 SQLiteDeveloper及破解 功能特点 表结构设计,数据维护,ddl生成,加密数据库支持,sqlite2,3支持 唯一缺憾,收费,有试用期 下载地址: http://w ...
- Yii中使用PHPexcel获取excel中数据
1.view中代码如下: <form name="frmBatchSettle" id="" action="" method=&qu ...
- C++primer 阅读点滴记录(三)
14章 操作符重载和转换 重载操作符是具有特殊名称的函数:保留字operator后接需要定义的操作符符号. 1.重载的操作符名: + – * / % ^ & | ~ ! , = < & ...
- MapReduce shuffle阶段详解
在Mapreduce中,Shuffle过程是Mapreduce的核心,它分布在Mapreduce的map阶段和reduce阶段,共可分为6个详细的阶段: 1).Collect阶段:将MapTask的结 ...
- uboot启动流程
uboot 的启动过程及工作原理2.1 启动模式介绍 大多数 Boot Loader 都包含两种不同的操作模式:"启动加载"模式和"下载"模式,这种区别仅 ...
- ios 文件操作
1.常见的NSFileManager文件方法 -(NSData *)contentsAtPath:path //从一个文件读取数据 -(BOOL)createFileAtPath: path cont ...