摘要:
插入排序的改进。递减增量排序算法。步长为1时就是插入排序。#includevoid ShellSort(int a[],int n){int i,j,k,temp,gap;int gaps[]={1,5,13,43,113,297,815,1989,4711,11969,27901,84801,21... 阅读全文
摘要:
#include#include#include=====================================================void Swap(int& a,int& b){ if(a!=b){ a^=b;b^=a;a^=b; }}==============... 阅读全文
摘要:
int binary_search(int array[], int n, intvalue){ int left=0,right=n-1; while(left>1); if(array[middle]>value) right = middle - 1; else if(arr... 阅读全文
摘要:
【TCP的那些事儿】TCP是个巨复杂的协议,而且不断地改进中。所以学习TCP本身是个比较痛苦的过程,但这个过程却能让人有很多收获。希望这篇快餐科普性文章能在快餐文化下让你对TCP有了解,并可以促发你对基础知识的兴趣和学习欲望。http://coolshell.cn/articles/11564.ht... 阅读全文
摘要:
GET/HTTP/1.1Host: www.baidu.comUser-Agent:Mozilla/5.0(Windows;U;WindowsNT5.1;en-US;rv:1.7.6)Gecko/20050225Firefox/1.0.1Connection:Keep-AlivePOST/HTTP/... 阅读全文