自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 稀疏矩阵线性表示

稀疏矩阵#include#include#include#define MAX 100typedef struct{ int data[MAX][MAX]; int m,n;}matrix;//一个普通矩阵typedef int spmatrix[MAX][3];//稀疏矩阵三元组表示法//一个普通矩阵的初始化void init(matrix*p,int m,i

2015-01-31 22:42:16 813

原创 KMP模式匹配

看了半天,还是糊里糊涂,先放这,回过头再看#include#include//求解next[]简化版本void getnext(char p[],int next[]){ int i=0,j=-1,len=strlen(p); next[0]=-1; while(i<len){ if(j==-1||p[i]==p[j]){

2015-01-30 22:46:08 382

原创 双向链表

#include#includetypedef int type;typedef struct Dnode{ type info; struct Dnode*prior; struct Dnode*next;}dnode;//返回一个建立的双链表头指针,head->next=NULL,head->prior-NULL;dnode* init(){ d

2015-01-30 17:43:43 434

原创 链队

#include#include#includetypedef int type;typedef struct Node{ type info; struct Node*next;}node;//队列声明,保存头指针,尾指针typedef struct{ node *front; node *rear;}queue;//初始化一个空队列并返回其

2015-01-30 17:42:57 479

原创 链栈

#include#includetypedef int type;typedef struct Node{ type info; struct Node*next;}node;//返回一个栈的头指针node*init(){ node*head=(node*)malloc(sizeof(node)); head->next=NULL; retu

2015-01-30 17:38:37 638

原创 带头节点的链表

链表的基本操作#include#include#includetypedef int type;typedef struct Node{ type info; struct Node *next;}node;//建立一个头节点并将其指针返回node *node_init(){ node *head=(node*)malloc(sizeof(node

2015-01-30 17:37:17 614

原创 顺序表相关操作

#include#define MAX 100//定义顺序表的最大值//顺序表的定义typedef struct{ int l[MAX]; int size;//顺序表的长度}sequence_list;//函数功能:顺序表的初始化——置空表//函数参数:指向sequenc_list型变量的指针head//函数返回值:空//文件名:sequenc_list.h 函

2015-01-16 17:16:47 540

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除