- 博客(7)
- 收藏
- 关注
原创 内部排序算法
#ifndef _SORT_H_#define _SORT_H_#endif #include <stdlib.h> #include <stdio.h> void bubble_sort(int *a,int len){int i,j,t;for(i=0;i<len-1;i++)//整体比较次数 (比如两个数只需要比较一次)所以要减一 for(j...
2018-06-29 15:12:04
172
原创 利用循环队列实现舞伴配对
#ifndef _CYCLELINE_H_#define _CYCLELINE_H_#endif #include<stdlib.h> #include <string.h> #include "stdio.h"#include "math.h"#define MaxSize 100typedef int status;typedef char...
2018-04-17 21:30:11
2418
原创 利用栈实现括号配对
#ifndef _SEQSTACK_#define _SEQSTACK_#endif#include "stdio.h"#include "math.h" typedef struct { DataType stack [MaxSize]; int top; int count; } SeqStack; v...
2018-04-17 21:27:53
232
原创 顺序表链表联合操作
#ifndef _LINLIST_H_#define _LINLIST_H_#endif #include <string.h>#include <stdio.h>#include <stdlib.h>#include <math.h>typedef int status;typedef int DataType;typedef int statu...
2018-03-24 14:40:09
267
原创 链表的操作
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "LinList.h"typedef int status;typedef int DataType;int main (){ LNode *L; int x,b,num,choose; i...
2018-03-22 20:44:39
129
原创 单链表逆置
头插法 void ListReverse(SLNode *head) { SLNode *p,*q; p=head->next; head->next=NULL; //break the contact between "head" and "p(hea...
2018-03-08 15:36:54
115
原创 顺序表和单链表
建立顺序表和单链表时,需要自己书写库函数文件 类似于SeqList.h 等的“.h" 文件。库函数中的数据变量均为不确定的,这便于今后再调用的时候,根据程序需要另行定义。在写主程序是,要注意main() 函数前的数据类型定义,库函数引入和变量定义的先后顺序。对于指针,*p输出一定是某变量的值,p=&a ,*p为a的值,p=a; *p 输出为错误。其他见解已在代码中标出
2017-12-31 20:05:18
371
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人