随笔分类 - edu
摘要:1 /*请在此处编写代码,完成哈夫曼编码,并能输出每个叶子结点的编码*/ 2 /********** Begin *********/ 3 4 /*请在此处编写代码,完成哈夫曼编码,并能输出每个叶子结点的编码*/ 5 /********** Begin *********/ 6 #include <
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <strings.h> 4 #define MAX 100 5 6 char * p; 7 typedef struct BTree{ 8 char * str; 9 struct BTree
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 4 typedef int DataType; 5 //顺序队列:类型和界面函数声明 6 struct SeqQueue 7 {// 顺序队列类型定义 8 int MAXNUM; // 队列中最大元素个数 9
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 #include<stdbool.h> 4 /*此处是顺序线性表数据结构定义*/ 5 typedef int DataType; 6 struct seqList 7 {//有3个数据成员 8 int MAXN
阅读全文
摘要:第1关:顺序表基本操作及应用 1 #include <stdlib.h> 2 #include <stdio.h> 3 4 5 typedef int DataType; 6 struct SeqList{ 7 DataType *elem; 8 int Max; //表示线性表最大长度 9 int
阅读全文
摘要:1 #include <iostream> 2 #include <stdio.h> 3 #include <time.h> 4 #include "head.h" 5 using namespace std; 6 //realize headSort 7 const int maxn=1000;
阅读全文
摘要:参考链接:https://www.cnblogs.com/blogxjc/p/11287961.html,https://www.cnblogs.com/Roni-i/p/8586332.html,https://www.cnblogs.com/lanhaicode/p/10776166.html
阅读全文
摘要:#include <stdio.h> #include <stdlib.h> struct node {//链表结点类型,包含一个存放整型数据的 data 成员,和一个指向下一个结点的next成员 int data ; struct node *next ; }; struct node *mycr
阅读全文
摘要:#include <stdio.h> #include <math.h> int reverse(int data) { //请在此填写代码,实现将参数data的值反转,并返回的功能 /* begin */ int ans=0,cnt=0,a[1000],flag=0; if(data<0){ fl
阅读全文
摘要:#include <stdio.h> #include<string.h> #include<stdlib.h> //第一关代码 struct node {//此处填写代码,定义链表结点类型,包含一个存放整型数据的 成员,和一个指向下一个结点的成员 int data; struct node* ne
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 //第一关代码 4 typedef int DataType; 5 typedef struct node * PNode; 6 struct node 7 {//此处填写代码,定义链表结点类型,包含一个存放整
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /*此处是顺序线性表数据结构定义*/ 5 typedef int DataType; 6 struct seqList 7 {//有3个数据成员 8 int MAXNUM;//用于记录顺序线性表中能存放的最
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /*此处是链栈数据结构定义*/ 5 typedef int DataType; 6 struct node 7 { 8 DataType info; 9 struct node *link; 10 }; 1
阅读全文
摘要:1 #include <stdio.h> 2 3 /*此处是顺序栈数据结构定义*/ 4 typedef int DataType; 5 struct seqStack 6 {//有3个数据成员 7 int MAXNUM;//用于记录顺序栈中能存放的最大元素个数的 整型 MAXNUM 8 int to
阅读全文
摘要:1 #include <iostream> 2 using namespace std; 3 4 typedef char DataType; 5 6 //二叉树数据结构 7 struct node 8 { 9 DataType info ; //存放结点数据 10 struct node *lch
阅读全文