- 博客(7)
- 收藏
- 关注
原创 6、数组和链表的逆置算法
#include <iostream> #define SIZE 10 using namespace std; typedef struct LNode { int data; struct LNode *next; }; void reverseArray(int a[],int s) //数组的逆置函数 { int i=0,j=s,temp; ...
2019-02-28 15:59:47
241
原创 5、两个有序单链表的归并排序算法
#include <iostream> #include <stdlib.h> using namespace std; typedef struct LNode { int data; struct LNode *next; }LNode; LNode * createLinkList() //构造带头结点的链表 ,尾插法,构造的节点要有序 ...
2019-02-27 20:05:19
1309
原创 5、两个单链表的二路归并算法
#include <iostream> #include <stdlib.h> using namespace std; typedef struct LNode { int data; struct LNode *next; }LNode; LNode * createLinkList() //构造带头结点的链表 ,尾插法,构造的节点要有序 ...
2019-02-27 19:54:29
1193
原创 4、两个数组的二路归并算法
#include <iostream> using namespace std; //顺序表的二路归并操作 ,数组存储 ,传入的数组从小到大排列,合并后的数组仍然是从小到大排列 void mergeArray(int a[],int m,int b[],int n,int c[]) //传入数组和数组的长度 ,不是下标 { int i=0,j=0,k=0; wh...
2019-02-27 18:00:32
400
原创 3、手动输入创建单链表
#include <iostream> #include <stdlib.h> using namespace std; typedef struct LNode{ char c; struct LNode *next; }LNode; void createLinkList(int n,LNode *&head) // 我是用t...
2019-02-27 08:58:50
986
原创 2、双向链表最大值移动到头结点后
#include <iostream> #include <stdlib.h> using namespace std; typedef struct DLnode { int data; struct DLnode *left; struct DLnode *right; }DLnode; DLnode* createDLinkList()...
2019-02-27 08:57:15
452
原创 1、求一个链表当中的最大值和最小值
#include <iostream> #include <stdlib.h> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ typedef struct LNode { ...
2019-02-27 08:46:46
6346
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人