![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构树和二叉树
夜雨时’
好好学习进大厂
展开
-
数据结构--------数和二叉树(哈夫曼树的创建)
#include<iostream> using namespace std; typedef struct HTNode { int weight; int parent,lchild,rchild; }HTNode; void Select(HTNode *&HT,int a,int &s1,int &s2) { s1=1; int temp; while(s1<=a) { if(HT[s1].parent==0) { break;.原创 2021-10-20 15:41:03 · 116 阅读 · 0 评论 -
数据结构-----------树和二叉树(线索二叉树)
#include<iostream> using namespace std; typedef struct BiTreeNode { char data; struct BiTreeNode *lchild; struct BiTreeNode *rchild; int LTag,RTag; }BiTree; BiTree *pre; void CreatNode1(BiTree *&T) //先序遍历建立二叉链表 { char ch; cin>>ch.原创 2021-10-17 23:40:41 · 65 阅读 · 0 评论 -
数据结构----------树和二叉树
#include<iostream> using namespace std; typedef struct BiTNode { char data; struct BiTNode *lchild; struct BiTNode *rchild; }BiTree; void CreatNode1(BiTree *&T) //先序遍历建立二叉链表 { char ch; cin>>ch; if(ch=='#') T=NULL; else { T=n.原创 2021-10-14 21:30:01 · 79 阅读 · 0 评论