摘要:
转载自:http://blog.csdn.net/youxin2012/article/details/11538491 dll 两种链接方式 : 动态链接和静态链接(链接亦称加载) 动态链接是指在生成可执行文件时不将所有程序用到的函数链接到一个文件,因为有许多函数在操作系统带的dll文件中,当程序 阅读全文
2016年2月28日
摘要:
#include <iostream> #include <fstream> using namespace std; struct LinkNode { int data; LinkNode* next; }; LinkNode* createLink(LinkNode* head) { ifst 阅读全文
2016年2月23日
摘要:
1,头文件 #include <stack> #include <queue> 2,声明 stack<int> stackTest; queue<int> queueTest; 3,常用函数操作 (1)栈 s.empty() 如果栈为空返回true,否则返回false s.size() 返回栈中元素 阅读全文
2016年2月22日
摘要:
数组A,右移k位,要求在线性时间内完成。 #include <iostream> using namespace std; template <typename T> void reverseArray(T* a, int start, int endArray) { int ed = endArr 阅读全文
摘要:
#include <iostream> #include <assert.h> /** * Key: * * get someone bit: num & (mode1bit<<N) * * check a few bits: num & (mode3bit<<shift) == What */ i 阅读全文
2016年2月21日
摘要:
/** Bubble Sort * * Key * * position: where swap * * iter: sub-position in each trip * */ template void bubble_pos_single(T* a, int n) { int pos = n-1; while(pos > 0) { i... 阅读全文
摘要:
#include using namespace std; /** Quick Sort * * split: cmp && swap * left * right * */ template int split(T* a, int low, int high) { while(low void quickSort(T* a, int low, int high) { ... 阅读全文
摘要:
#include using namespace std; /** Shell Sort * * Key: * * increment * * insertSort(:increment) * */ template void insertSort_shell(T* a, int start, int incre) { T tm; n=sizeof(... 阅读全文
摘要:
#include using namespace std; /** Simple Select Sort * brief: * Key: * * position: the max index * * trip: Begin and End(:n-i) * * swap * */ template void simpleSelect(T* a, int n) { ... 阅读全文
摘要:
#include using namespace std; /** \ Insert Sort * * Key: * * reserve: tm = a[i] * * position: int j = i-1 * * move : while * */ template void insertSort(T a[], int n) { T tm; ... 阅读全文