摘要: 《海量数据处理常用思路和方法》大数据量,海量数据 处理方法总结最近有点忙,稍微空闲下来,发篇总结贴。大数据量的问题是很多面试笔试中经常出现的问题,比如baidu google 腾讯 这样的一些涉及到海量数据的公司经常会问到。下面的方法是我对海量数据的处理方法进行了一个一般性的总结,当然这些方法可能并不能完全覆盖所有的问题,但是这样的一些方法也基本可以处理绝大多数遇到的问题。下面的一些问题基本直接来源于公司的面试笔试题目,方法不一定最优,如果你有更好的处理方法,欢迎与我讨论。1.Bloom filter适用范围:可以用来实现数据字典,进行数据的判重,或者集合求交集基本原理及要点:对于原理来说很简 阅读全文
posted @ 2011-11-24 21:22 贰百舞 阅读(452) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 int main() 4 {int jc(int); 5 6 int a,b,c; 7 cin>>a>>b>>c; 8 cout<<a<<"!+"<<b<<"!+"<<c<<"!="<<jc(a)+jc(b)+jc(c)<<endl; 9 10 return 0;11 }12 13 14 15 int 阅读全文
posted @ 2011-11-24 18:57 贰百舞 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 int main() 4 {int hcf(int,int); 5 int lcd(int,int,int); 6 int u,v,h,l; 7 cin>>u>>v; 8 h=hcf(u,v); 9 cout<<"H.C.F="<<h<<endl;10 l=lcd(u,v,h);11 cout<<"L.C.D="<<l<<endl;12 return 0; 阅读全文
posted @ 2011-11-24 18:49 贰百舞 阅读(136) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include<iomanip>using namespace std;int main() {double _x=1; cout<<setw(8)<<_x<<endl; return 0; }-------------#include <iostream>#include<iomanip>using namespace std;int main() {long _x=1; cout<<setw(8)<<_x<<setw(8)<& 阅读全文
posted @ 2011-11-24 18:46 贰百舞 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 using namespace std; 3 int main() 4 {int prime(int); /* 函数原型声明 */ 5 int n; 6 cout<<"input an integer:"; 7 cin>>n; 8 if (prime(n)) 9 cout<<n<<" is a prime."<<endl;10 else11 cout<<n<<" is not a prime." 阅读全文
posted @ 2011-11-24 18:32 贰百舞 阅读(172) 评论(0) 推荐(0) 编辑