- 博客(14)
- 收藏
- 关注
原创 实验六
#include<iostream>using namespace std;template<class T>struct BiNode{ T data; BiNode<T> *lchild,*rchild;};template<class T>class BiTree{public: BiTree(){ ...
2018-05-31 13:25:09 202
原创 实验五
# ifndef Bitree_H# define Bitree_Hstruct BiNode{char data;BiNode *lchild,*rchild;};class Bitree{public: Bitree(){root=Creat(root);} ~Bitree(){Release(root);} void PreOrder()...
2018-05-24 11:46:51 235
原创 实验四
#ifndef Tree_H#define Tree_Hconst int MaxSize=100;class Tree { public: Tree(){length=0;} void CreateTree(); void Message(int x); void Leave...
2018-05-18 23:35:02 175
原创 实验三间接寻址
#include <iostream> using namespace std; const int N=5; class Student{ private: int *scores[N]; int length; public: Student(int score[],int n); ~Student(){} ...
2018-05-10 13:21:19 170
原创 实验三静态链表
#include <iostream> using namespace std; const int N=100; struct Std{ int date; int next; }score[N]; class Student{ private: static int first; static int avai...
2018-05-10 13:19:16 113
原创 实验三双链表
#include <iostream> using namespace std; const int N = 5; struct Std { int date; Std *next,*prior; }*p, *r; class Student { private: Std * first; int length; ...
2018-05-10 13:16:47 142
原创 实验三单链表
#include <iostream> using namespace std; const int N=5; struct Std{ int date; Std *next; }*p,*r; class Student{ private: Std *first; int length; public: ...
2018-05-10 13:11:47 152
原创 实验三顺序表
#include <iostream> using namespace std; const int N=5; class Student{ private: int scores[N]; int length; public: Student(int score[],int n); ~Student(){} ...
2018-05-10 11:36:12 182
原创 实验二将十进制数转化为二进制
#include<iostream>using namespace std;void change(int n){ int c[100]={0},count; count=0; for(int i=0;n>0;i++) { c[i]=n%2; n=n/2; count++; } cout<<"将该数转化为2进制"; for(int j=...
2018-04-27 00:12:06 338
原创 实验二顺序队列
#include<iostream>using namespace std;const int QueueSize=100;class CirQueue{public: CirQueue(){front=rear=QueueSize-1;} ~CirQueue(){} void EnQueue(int x); int DeQueue(); int GetQueue(...
2018-04-26 23:59:12 128
原创 实验二链栈
#include<iostream>using namespace std;struct Node{ int data; struct Node*next;};class LinkStack{ public: LinkStack(){top=NULL;} ~LinkStack(); void Push(int x); int Pop(); i...
2018-04-26 23:32:50 113
原创 实验二链队列
#include<iostream>using namespace std;template<class DataType>struct Node{ DataType data; Node<DataType>*next;};template<class DataType>class LinkQueue{ Node<DataType>*fr...
2018-04-26 21:18:38 181
原创 实验二顺序栈
#include<iostream>using namespace std;const int StackSize=10;template<class DataType>class SeqStack{ public: SeqStack(){top=-1;} ~SeqStack(){} void Push(DataType x); DataType Po...
2018-04-26 19:50:38 144
原创 信管117237卓嘉健数据结构实验一
#ifndef SeqList_H#define SeqList_Hconst int MaxSize=10;class SeqList{public:SeqList(){length=0;}SeqList(int a[],int n);~SeqList(){}void Insert(int i,int x);int Delete(int i);int ...
2018-04-01 20:53:53 154
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人