平衡二叉樹, AVL
http://www.cnblogs.com/huangxincheng/archive/2012/07/22/2603956.html
字符串匹配KMP算法
http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.html
字符串匹配BM算法
http://www.ruanyifeng.com/blog/2013/05/boyer-moore_string_search_algorithm.html
快速排序及很多算法用到的partition過程
int partition(int arr[],int start,int end){
if(!arr || start <0){
return -1;
}
int index,small=start-1;
for(index=start;index<end;index++){
if(arr[index] < arr[end]){
small++;
if(small != index){
//arr[small]>arr[end],arr[index]<arr[end],所以進行交換
my_swap(arr[index],arr[small]);
}
}
}
//交換small和end,此時arr[small]比arr[end]大
small++;
my_swap(arr[small],arr[end]);
return small;
}
尋找K小數方法,O(n)算法:
void get_least_k(int arr[],int len,int out[],int k){
int start=0,end=len-1;
int index = partition(arr,start,end);
while(index != k-1){
if(index < k-1){
start = index + 1;
}else{
end = index - 1;
}
index = partition(arr,start,end);
}
for(int i=0;i<k;++i){
out[i] = arr[i];
}
}
尋找k小數,不修改原數組的O(nlogk)算法
typedef multiset<int,greater<int> > intSet;
typedef multiset<int,greater<int> >::iterator setIterator;
//參數說明:vec:輸入數值;least_k:存儲最小的k個數
void get_least_k(const vector<int> & vec,intSet& least_k,int k){
least_k.clear();
if(k < 1 || vec.empty() || vec.size() < k)
return;
for(vector<int>::const_iterator iter = vec.begin();
iter != vec.end();++iter){
if(least_k.size() < k){
least_k.insert(*iter);
}else{
setIterator largest = least_k.begin();
if(*iter < *largest){
//直接通過指針釋放元素
least_k.erase(largest);
//插入數值,multiset會自動調整樹結構成最大堆
least_k.insert(*iter);
}
}
}
}
霍夫曼編碼介紹:
http://www.thecodeway.com/blog/?p=870
數據庫內連接和外連接的區別:
http://www.cnblogs.com/tyut8518/archive/2008/03/23/1118338.html
數據庫及進程死鎖的分析:
http://blog.163.com/liuqiang_mail@126/blog/static/1099688752012525113320318/
數據庫共享鎖(S鎖)和互斥鎖(X鎖)區別
http://zh200581134.blog.163.com/blog/static/9601020201241911412389/
數據庫範式:
http://jacki6.iteye.com/blog/774866
數據庫索引:
http://kb.cnblogs.com/page/45712/
唯一性索引
http://www.cnblogs.com/helife/archive/2010/12/30/1921684.html
數據庫備份種類:
http://www.cnblogs.com/eecool/archive/2008/09/15/1291074.html
同一進程中的線程究竟共享哪些資源
http://blog.chinaunix.net/uid-12461657-id-3182841.html
信號量機制及進程同步四大原則
http://blog.csdn.net/jacson8408/article/details/7629225
進程的三種狀態及轉換
http://blog.chinaunix.net/uid-23883288-id-3028968.html
設計模式分類
http://www.cnblogs.com/justForMe/archive/2011/07/18/2109211.html
Java多態分析
http://www.cnblogs.com/mengdd/archive/2012/12/25/2832288.html
TCP三次握手&四次斷開&TIME_WAIT作用
http://blog.chinaunix.net/uid-25002135-id-3314682.html
線程和進程區別
http://www.cnblogs.com/flashsky/articles/642720.html
Bloom Filter算法
http://blog.csdn.net/jiaomeng/article/details/1495500
網易2013校園招聘題目
http://www.cnblogs.com/sooner/p/3279358.html
圖的鄰接矩陣,鄰接表,深度遍歷,廣度遍歷方法
http://blog.csdn.net/winterwinner/article/details/6711113
http://www.cnblogs.com/xiaofengkang/archive/2011/05/24/2055788.html
CAS操作原理
http://hi.baidu.com/pakko/item/3b6d5dfd0c3b4d0cc7dc456c
臨界區&互斥量等