数据结构
巨阙_
没有
展开
-
线性表顺序实现
线性表实现,创建表,插入元素,删除元素,销毁表,表的遍历,表的并集交集差集。。。。。不断更新中。。。#include<iostream> #include<cstdio> #include<stdlib.h> #include<string.h> #define LIST_INIT_SIZE 100//初始大小 #define error 0 #de...原创 2018-03-13 09:59:47 · 324 阅读 · 0 评论 -
循环单链表(新版)
#include<iostream> #include<stdlib.h> using namespace std; #define error -1 /* create and operate a list with a head node. */ typedef struct Lnode { int data; Lnode *next; } Lno...原创 2020-10-12 12:26:19 · 217 阅读 · 0 评论 -
单链表升序合并和降序合并(新版)
#include <iostream> #include<stdlib.h> using namespace std; typedef struct Lnode { int data; Lnode *next; } Lnode; /*void listCreateByHead(Lnode *&h)//create a list by inse...原创 2019-05-07 10:40:18 · 834 阅读 · 0 评论 -
单链表创建及增删改查销毁(新版)
#include<iostream> #include<stdlib.h> using namespace std; #define error -1 /* create and operate a list with a head node, add,delete,update,search,destroy. */ typedef struct Lnode { ...原创 2019-05-07 10:39:25 · 249 阅读 · 1 评论 -
线性表增删改查(新版)
#include <iostream> using namespace std; #define maxSize 100 #define error -1 typedef struct { int data[maxSize]; int length=0; } Sqlist; void ListInit(Sqlist &L)// init a new List...原创 2019-05-06 10:54:51 · 587 阅读 · 0 评论 -
二叉树
#include <iostream>#include <stdlib.h>using namespace std;typedef struct BiTNode{ int data; struct BiTNode *lc,*rc;} BitNode,*BiTree;void CreateTree(BiTNode *T){ T=(BiTNode *)mall...原创 2018-05-08 09:50:14 · 121 阅读 · 0 评论 -
栈和队列的基本操作
#include<iostream> #include<stdlib.h> using namespace std; typedef int SElemType; typedef int Status; typedef int QElemType; #define STACK_INIT_SIZE 100 #define STACKINCREMENT 10 #define...原创 2018-04-03 09:39:30 · 228 阅读 · 0 评论 -
链表建立,插入,查找,删除,归并
#include<iostream> #include<cstdio> #include<stdlib.h> using namespace std; int len; struct Node { int data; Node *next; }; Node *CreateList()//创建 { Node *pHead=(Node *...原创 2018-03-26 23:17:02 · 209 阅读 · 0 评论 -
链表删除和遍历
#include<iostream> #include<stdio.h> #include<cstring> #include<algorithm> #include<vector> using namespace std; struct Node { int data; struct Node *next; }; i...原创 2018-03-09 13:48:48 · 420 阅读 · 0 评论 -
双向链表(新版)
#include<iostream> #include<stdlib.h> using namespace std; #define error -1 typedef struct Lnode { int data; struct Lnode *prior; struct Lnode *next; } LNode; void listInser...原创 2020-10-12 12:26:25 · 206 阅读 · 0 评论