![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
文章平均质量分 75
najuli
研究僧
展开
-
双向链表的相关操作C++实现
双向链表的相关操作C++实现 对于循环双向链表 判断一个链表是否为空的条件为:head->next==head (头指针) 判断*p为最后一个节点的条件为:p->next=head [cpp] view plaincopy #include using namespace std; /*双链表结构*/ ty转载 2015-04-20 23:41:01 · 459 阅读 · 0 评论 -
C++双向循环链表实现基数排序算法
文件: baseSort.h baseSort.cpp 命令: g++ baseSort.cpp -o baseSort /*baseSort.h*/ /* * the head file of baseSort * */ #include #include #include #include using namespace std; typedef struct node { s原创 2015-04-21 21:26:40 · 1192 阅读 · 0 评论 -
用归纳递归实现插入排序
文件 c.cpp 命令 g++ -o c c.cpp #include using namespace std; template void insert_sort_rec(Type A[],int n) { int k; Type a; n = n - 1; if(n > 0) { insert_sort_rec(A,n); a = A[n]; k = n -1;原创 2015-05-05 19:52:19 · 461 阅读 · 0 评论