NoFear

导航

2012年8月29日

摘要: //节点类struct LISTNODE{ int n_value ; int count; char *str_value ; LISTNODE * p_next ;};//哈希表struct HASHTABLE{ int n_tablesize ; LISTNODE ** p_node ;};void hashtable_clear(HASHTABLE* head_ht);LISTNODE* hashtable_find(char *str ,HASHTABLE* head);int hashtable_hash(char* str, int table... 阅读全文

posted @ 2012-08-29 12:58 Fear_Hao 阅读(3130) 评论(0) 推荐(0) 编辑

摘要: 参考链接:http://blog.csdn.net/morewindows/article/category/859207快排-冒泡-直接插入-直接选择-归并-堆排序[swap]两数交换 不使用中间变量inline void swap( int &a , int & b) { if (a != b) /需判断 可能会置0 { // a^b = c 对c用a可以解出b 对c用b 可以解出a a = a ^ b; //对c 用旧b解锁得到 a; ... 阅读全文

posted @ 2012-08-29 11:01 Fear_Hao 阅读(247) 评论(0) 推荐(0) 编辑

摘要: 参考链接:http://blog.csdn.net/morewindows/article/details/7370155void _swap (char * a, char *b){ char k = *a; * a = *b ; * b = k ;}int str_all_sort (char * str,int pos, int size ){ printf("%d" ,pos); if(pos == size) { printf("-"... 阅读全文

posted @ 2012-08-29 10:55 Fear_Hao 阅读(599) 评论(0) 推荐(0) 编辑