php二叉树广度插入数据 php实现二叉树

题 二叉树的广度优先遍历标题:二叉树的广度优先遍历
有一个二叉树,每一个节点都有一个大写字母标识(最多26个节点) 。
现有两组字母 , 分别表示后序遍历(左-右-父)和中序遍历(左-父-右)的结果,请输出层次遍历的结果 。
输入描述:
输入为两个字符串,分别是二叉树的后续遍历和中序遍历结果 。
输出描述:
输出二叉树的层次遍历结果 。
示例1
输入
CBEFDA CBAEDF
输出
ABDCEF
说明
二叉树为:
A
/ \
BD
// \
CEF
JS中的二叉树遍历栈、队列、链表等数据结构,都是顺序数据结构 。而树是非顺序数据结构 。树型结构是一类非常重要php二叉树广度插入数据的非线性结构 。直观地,树型结构是以分支关系定义的层次结构 。
二叉树(Binary Tree)是另一种树型结构,它的特点是每个结点至多只有两棵子树(即二叉树中不存在度大于2的结点),并且,二叉树的子树有左右之分(其次序不能任意颠倒 。)
遍历二叉树(Traversing Binary Tree):是指按指定的规律对二叉树中的每个结点访问一次且仅访问一次 。
二叉树有深度遍历和广度遍历,深度遍历有前序、 中序和后序三种遍历方法 。二叉树的前序遍历可以用来显示目录结构等php二叉树广度插入数据;中序遍历可以实现表达式树,在编译器底层很有用php二叉树广度插入数据;后序遍历可以用来实现计算目录内的文件及其信息等 。
上述二叉树(a b*c)-d/e在js中可以用对象的形式表示出来:
先递归遍历左子树,从最左的一个左子树存入数组php二叉树广度插入数据;然后回溯遍历双亲结点 , 再是右子树,这样递归循环 。
将当前结点压入栈,然后将左子树当做当前结点,如果当前结点为空 , 将双亲结点取出来 , 将值保存进数组,然后将右子树当做当前结点,进行循环 。
先走左子树,当左子树没有孩子结点时,将此结点的值放入数组中,然后回溯遍历双亲结点的右结点,递归遍历 。
广度优先遍历二叉树(层序遍历)是用队列来实现的,广度遍历是从二叉树的根结点开始,自上而下逐层遍历;在同一层中 , 按照从左到右的顺序对结点逐一访问 。
js 中二叉树的深度遍历与广度遍历(递归实现与非递归实现)
二叉树与JavaScript
平衡二叉树的操作(高手进)以前做的 。
一、 需求分析
1. 本程序是是利用平衡二叉树实现一个动态查找表,实现动态查找表的三种基本功能:查找、插入和删除 。
2. 初始,平衡二叉树为空树,可以按先序输入平衡二叉树 , 以输入0结束,中间以回车隔开,创建好二叉树后 , 可以对其查找,再对其插入 , 输入0结束插入,再可以对其删除,输入0结束,每次插入或删除一个结点后,更新平衡二叉树的显示 。
3. 本程序以用户和计算机的对话方式执行,根据计算机终端显示:“提示信息”下,用户可由键盘输入要执行的操作 。
4. 测试数据(附后)
二、 概要设计
1. 抽象数据类型动态查找表的定义如下:
ADT DynamicSearchTable{
数据结构D:D是具有相同特性的数据元素的集合 。各个数据元素含有类型相同,可惟一标识数据元素的关键字 。
数据关系R:数据元素同属一个集合 。
基本操作P:
InitDSTable(DT);
操作结果:构造一个空的动态查找表DT 。
DestroyDSTable(DT);
初试条件:动态查找表DT存在 。
操作结果:销毁动态查找表DT 。
SearchDSTable(DT,key);
初试条件:动态查找表DT存在,key为和关键字类型相同的给定值 。
操作结果: 若DT中存在其关键字等于key的数据元素,则函数值为该元素的值或表中的位置 , 否则为“空” 。
InsertDSTable(DT,e);
初试条件:动态查找表DT存在,e为待插入的数据元素 。
操作结果:若DT中不存在其关键字等于e. key的数据元素 , 则插入e到DT 。
DeleteDSTable(DT,key);
初试条件:动态查找表DT存在,key为和关键字类型相同的给定值 。
操作结果: 若DT中存在其关键字等于key的数据元素,则删除之 。
TraverseDSTable(DT,Visit());
初试条件:动态查找表DT存在 , Visit()是结点操作的应用函数 。
操作结果: 按某种次序对DT的每个结点调用函数Visit()一次且至多
一次 。一但Visit()失败,则操作失败 。
}ADT DynamicSearchTable
2. 本程序包含两个模块:
Void main(){
Do{
接受命令(根据提示输入终点城市和起点城市的序号);
处理命令;
}while(“命令”=“退出”);
}
3.本程序只有两个模块 , 调用关系简单
主程序模块
平衡二叉树的模块
三、 详细设计
1. 根据题目要求和查找的基本特点 , 其结点类型
typedef struct BSTnode{
int data;
int bf;
struct BSTnode *lchild,*rchild;
}BSTnode,*bstree;
#define LH1
#define EH 0
#define RH -1
/-----------------------------************对平衡二叉树的操作
bstree InsertAVL(bstree T, int e);
////////在平衡二叉树中插入结点 。
int FindAVL(bstree p,int e);
////////查找平衡二叉树中是否有结点e 。
bstree DeleteAVL(bstree T,int e)
////////删除平衡平衡二叉树的结点e,并保持平衡二叉树的性质 。
int Preordertraverse(bstree T)
////////按先序遍历平衡二叉树 。
/------------------------************平衡二叉树的操作的详细算法
bstree InsertAVL(bstree T, int e)
{
bstree p;
//插入新结点,树长高置taller为TRUE
if(!T) {
T=(bstree)malloc(sizeof(BSTnode));
T-data=https://www.04ip.com/post/e;
T-lchild=T-rchild=NULL;
T-bf=EH;
taller=TRUE;
}
else {
//树中存在和e有相同关键字的结点则不再插入
if(e==T-data){
taller=FALSE;
return NULL;
}
//值小于则继续在树的左子树中搜索
if(eT-data){
//插入到左子树且左子树长高
p=InsertAVL(T-lchild,e);
if(p){
T-lchild=p;
if(taller) {
switch(T-bf){//检查*T的平衡度
case LH://原本左子树比右子树高,需要做左平衡处理
T=LeftBalance(T);
taller=FALSE;
break;
case EH://原本左子树和右子树同高 , 现因左子树争高而使树增高
T-bf=LH;
taller=TRUE;
break;
case RH://原本右子树比左子树高,现在左右子树等高
T-bf=EH;
taller=FALSE;
break;
}///////switch(T-bf)
}///////if(taller)
}/////if(p)
}///////if(eT-data)
//继续在*T的右子树中搜索
else{
//插入到右子树且使右子树长高
p=InsertAVL(T-rchild,e);
if (p){
T-rchild=p;
if(taller) {
switch(T-bf){//检查*T的平衡度
case LH://原本左子树比右子树高,现在左右子树等高
T-bf=EH;
taller=FALSE;
break;
case EH://原本左子树和右子树同高 , 现因右子树增高而使树增高
T-bf=RH;
taller=TRUE;
break;
case RH://原本右子树比左子树高,需要做右平衡处理
T=RightBalance(T);
taller=FALSE;
break;
}//////switch(T-bf)
}/////if(taller)
}/////if (p)
}//////if(eT-data)
}///////else
return T;
}
int Preordertraverse(bstree T){
if(T){
printf(" %d %d\n",T-data,T-bf);
Preordertraverse(T-lchild);
Preordertraverse(T-rchild);
}
return 1;
}
int FindAVL(bstree p,int e){
if(p==NULL)return NULL;
else if(e==p-data) return true;
else if(ep-data){
p=p-lchild;
return FindAVL(p, e);
}////左子树上查找
else {
p=p-rchild;
return FindAVL( p, e);
}////右子树上查找
【php二叉树广度插入数据 php实现二叉树】}
bstree DeleteAVL(bstree T,int e){
//删除后要保证该二叉树还是平衡的
int n,m=0;/////标记
bstree q;
if(!T)return NULL;
else {
if(e==T-data) {////直接删除
n=Delete(T,e);
m=n;
if(m!=0) {
q=T;
DeleteAVL(T,m);
q-data=https://www.04ip.com/post/m;}
}
else {
if(eT-data){////在左子树上寻找
DeleteAVL(T-lchild,e);
if(shorter){
switch(T-bf){
case LH:T-bf=EH;shorter=true;break;
case EH:T-bf=RH;shorter=false;break;
case RH:Delete_Rightbalance(T);shorter=true;break;
}////switch(T-bf)
}/////if(shorter)
}/////if(eT-data)
else{ /////////在右子树上寻找
DeleteAVL(T-rchild,e);
if(shorter)
switch(T-bf){
case LH:Delete_Leftbalance(T);shorter=true;break;
case EH:T-bf=LH;shorter=false;break;
case RH:T-bf=EH;shorter=true;break;
}////////switch(T-bf)
}////////在右子数上寻找完
}////////在左右子上完
}///////////删除完
return T;
}
2. 主程序和其他伪码算法
void main(){
while(e!=0){
if(e!=0) InsertAVL(T,e);
}
while(d!=0){
if(d!=0) InsertAVL(T,d);
Preordertraverse(T);
}
c=FindAVL(T,t);
if(c==1)printf("有要查找的节点\n");
else printf("无要查找的节点\n");
do{
DeleteAVL(T,b);
Preordertraverse(T);
}while(b==1);
}
///右旋
bstree R_Rotate(bstree p){
bstree lc;
lc=p-lchild;
p-lchild=lc-rchild;
lc-rchild=p;
p=lc;
return p;
}
////左旋
bstree L_Rotate(bstree p){
bstree rc;
rc=p-rchild;
p-rchild=rc-lchild;
rc-lchild=p;
p=rc;
return p;
}
/////左平衡处理
bstree LeftBalance(bstree T){
bstree lc,rd;
lc=T-lchild;//lc指向*T的左子树根结点
switch(lc-bf) {//检查*T的左子树平衡度,并做相应的平衡处理
case LH://新结点插入在*T的左孩子的左子树上,要做单右旋处理
T-bf=lc-bf=EH;
T=R_Rotate(T);
break;
case RH://新结点插入在*T的左孩子的右子树上 , 要做双旋处理
rd=lc-rchild;//rd指向*T的左孩子的右子树根
switch(rd-bf){//修改*T及其左孩子的平衡因子
case LH:
T-bf=RH;
lc-bf=EH;
break;
case EH:
T-bf=lc-bf=EH;
break;
case RH:
T-bf=EH;
lc-bf=LH;
break;
}//////////switch(rd-bf)
rd-bf=EH;
T-lchild=L_Rotate(T-lchild); //对*T的左孩子做左旋平衡处理
T=R_Rotate(T);//对*T做右旋处理
}////////switch(lc-bf)
return T;
}
////右平衡处理
bstree RightBalance(bstree T)
{
bstree rc,ld;
rc=T-rchild;//rc指向*T的右子树根结点
switch(rc-bf) {//检查*T的右子树平衡度 , 并做相应的平衡处理
case RH://新结点插入在*T的右孩子的右子树上,要做单右旋处理
T-bf=rc-bf=EH;
T=L_Rotate(T);
break;
case LH://新结点插入在*T的右孩子的左子树上,要做双旋处理
ld=rc-lchild;//ld指向*T的右孩子的左子树根
switch(ld-bf){//修改*T及其右孩子的平衡因子
case LH:
T-bf=EH;
rc-bf=RH;
break;
case EH:
T-bf=rc-bf=EH;
break;
case RH:
T-bf=LH;
rc-bf=EH;
break;
}///switch(ld-bf)
ld-bf=EH;
T-rchild=R_Rotate(T-rchild); //对*T的右孩子做右旋平衡处理
T=L_Rotate(T);//对*T做左旋处理
}/////switch(rc-bf)
return T;
}
int Delete(bstree T,int e){
//删除结点
bstree p,q;
e=0;
p=T;
if(!T-rchild) {//右子数为空需要重接它的左子数
T=T-lchild;
free(p);
shorter=true;
}
else if(!T-lchild) {//重接它的右子数
T=T-rchild;
free(p);
shorter=true;
}
else{ //左右子数均不空
q=T-lchild;
while(q-rchild!=NULL){//转左,然后向右到尽头
q=q-rchild;
}
e=q-data;
}
return e;
}
void Delete_Rightbalance(bstree T){
///////////删除在左子树上的,相当于插入在右子树
bstree rc=T-rchild,ld;
switch(rc-bf){
case LH://///////双旋 , 先右旋后左旋
ld=rc-lchild;
rc-lchild=ld-rchild;
ld-rchild=rc;
T-rchild=rc-lchild;
rc-lchild=T;
switch(ld-bf) {
case LH:T-bf=EH;
rc-bf=RH;
break;
case EH:T-bf=rc-bf=EH;
break;
case RH:T-bf=LH;
rc-bf=EH;
break;
}
ld-bf=EH;
T=rc;
shorter=true;break;
case EH:///////删除在左子树,相当于插入在右子树,左单旋
T-rchild=rc-lchild;
rc-lchild=T;
rc-bf=LH;
T-bf=RH;
T=rc;
shorter=EH;break;
case RH:///////删除在左子树,相当于插入在右子树,左单旋
T-rchild=rc-lchild;
rc-lchild=T;
rc-bf=T-bf=EH;
T=rc;
shorter=true;break;
}
}
void Delete_Leftbalance(bstree T)/////删除右子树上的,相当于插入在左子树上
{
bstree p1,p2;
p1=T-lchild;
switch(p1-bf){
case LH:T-lchild=p1-rchild;//////右旋
p1-rchild=T;
p1-bf=T-bf=EH;
T=p1;
shorter=true;
break;
case EH:T-lchild=p1-rchild;///////右旋
p1-rchild=T;
p1-bf=RH;
T-bf=LH;
T=p1;
shorter=false;
break;
case RH:p2=p1-rchild;//////////右双旋
p1-rchild=p2-lchild;
p2-lchild=p1;
T-lchild=p2-rchild;
p2-rchild=T;
switch(p2-bf){
case LH:T-bf=RH;p1-bf=EH;break;
case EH:T-bf=EH;p1-bf=EH;break;
case RH:T-bf=EH;p1-bf=LH;break;
}
p2-bf=EH;
T=p2;
shorter=true;break;
}
}
3. 函数的调用关系图
Main
InsertAVLPreordertraverseFindAVLDeleteAVL
四、 调试分析
1. 在开始对平衡二叉树的插入后 , 再做平衡处理时,特别是在做双向旋转平衡处理后的更新时,费了一些时间;
2. 在做平衡二叉树的删除时,当删除结点左右孩子均在时,开始直接用左子树的最大数代替,然后直接删除结点,结果导致删除了将要删除的结点及其孩子均删除了,后来将要删除的结点用左子树的最大树代替后,对左子树的最大结点做好标记 , 然后再做对其做删除处理 。
3. 本程序算法基本简单,没有多大困难 , 就是在分析做双旋平衡处理的更新时 , 开始思路有些混乱 , 后来就好了;
五、 用户手册
1. 本程序的运行环境为DOS操作系统,执行文件为Balanced Tree.exe 。
2. 进入演示程序后,按广度遍历输入平衡二叉树,中间以回车键隔开,输入0为结束;再输入要插入的结点,输入0结束,再输入要查找的结点 , 最后可以输入要删除的结点 , 输入0结束
六、 测试结果
先按广度遍历创建平衡二叉树(亦可一个一个的插入二叉树的结点)(50 20 60 10 30 55 70 5 15 25 58 90) ,输入0结束,然后可插入结点(39),其会显示插入后的二叉树,输入0,不再插入;输入要查找结点(6),输入要删除的结点(20),其显示如下:
七、 附录
Balance Tree.cpp
PHP版本二叉树按层 从上到下左到右完全二叉树?php
/*** 二叉树的定义*/
class BinaryTree {
protected $key = NULL;//当前节点的值
protected $left = NULL;//左子树
protected $right = NULL;//右子树
/*** 以指定的值构造二叉树 , 并指定左右子树*
* @param mixed $key 节点的值.
* @param mixed $left 左子树节点.
* @param mixed $right 右子树节点.
*/
public function __construct( $key = NULL, $left = NULL, $right = NULL) {
$this-key = $key;
if ($key === NULL) {
$this-left = NULL;
$this-right = NULL;
}
elseif ($left === NULL) {
$this-left = new BinaryTree();
$this-right = new BinaryTree();
}
else {
$this-left = $left;
$this-right = $right;
}
}
/**
* 析构方法.
*/
public function __destruct() {
$this-key = NULL;
$this-left = NULL;
$this-right = NULL;
}
/**
* 清空二叉树.
**/
public function purge () {
$this-key = NULL;
$this-left = NULL;
$this-right = NULL;
}
/**
* 测试当前节点是否是叶节点.
*
* @return boolean 如果节点非空并且有两个空的子树时为真 , 否则为假.
*/
public function isLeaf() {
return !$this-isEmpty()
$this-left-isEmpty()
$this-right-isEmpty();
}
/**
* 测试节点是否为空
*
* @return boolean 如果节点为空返回真,否则为假.
*/
public function isEmpty() {
return $this-key === NULL;
}
/**
* Key getter.
*
* @return mixed 节点的值.
*/
public function getKey() {
if ($this-isEmpty()) {
return false;
}
return $this-key;
}
/**
* 给节点指定Key值,节点必须为空
*
* @param mixed $object 添加的Key值.
*/
public function attachKey($obj) {
if (!$this-isEmpty())
return false;
$this-key = $obj;
$this-left = new BinaryTree();
$this-right = new BinaryTree();
}
/**
* 删除key值 , 使得节点为空.
*/
public function detachKey() {
if (!$this-isLeaf())
return false;
$result = $this-key;
$this-key = NULL;
$this-left = NULL;
$this-right = NULL;
return $result;
}
/**
* 返回左子树
*
* @return object BinaryTree 当前节点的左子树.
*/
public function getLeft() {
if ($this-isEmpty())
return false;
return $this-left;
}
/**
* 给当前结点添加左子树
*
* @param object BinaryTree $t 给当前节点添加的子树.
*/
public function attachLeft(BinaryTree $t) {
if ($this-isEmpty() || !$this-left-isEmpty())
return false;
$this-left = $t;
}
/**
* 删除左子树
*
* @return object BinaryTree返回删除的左子树.
*/
public function detachLeft() {
if ($this-isEmpty())
return false;
$result = $this-left;
$this-left = new BinaryTree();
return $result;
}
/**
* 返回当前节点的右子树
*
* @return object BinaryTree 当前节点的右子树.
*/
public function getRight() {
if ($this-isEmpty())
return false;
return $this-right;
}
/**
* 给当前节点添加右子树
*
* @param object BinaryTree $t 需要添加的右子树.
*/
public function attachRight(BinaryTree $t) {
if ($this-isEmpty() || !$this-right-isEmpty())
return false;
$this-right = $t;
}
/**
* 删除右子树,并返回此右子树
* @return object BinaryTree 删除的右子树.
*/
public function detachRight() {
if ($this-isEmpty ())
return false;
$result = $this-right;
$this-right = new BinaryTree();
return $result;
}
/**
* 先序遍历
*/
public function preorderTraversal() {
if ($this-isEmpty()) {
return ;
}
echo ' ', $this-getKey();
$this-getLeft()-preorderTraversal();
$this-getRight()-preorderTraversal();
}
/**
* 中序遍历
*/
public function inorderTraversal() {
if ($this-isEmpty()) {
return ;
}
$this-getLeft()-preorderTraversal();
echo ' ', $this-getKey();
$this-getRight()-preorderTraversal();
}
/**
* 后序遍历
*/
public function postorderTraversal() {
if ($this-isEmpty()) {
return ;
}
$this-getLeft()-preorderTraversal();
$this-getRight()-preorderTraversal();
echo ' ', $this-getKey();
}
}
/**
* 二叉排序树的PHP实现
*/
class BST extends BinaryTree {
/**
* 构造空的二叉排序树
*/
public function __construct() {
parent::__construct(NULL, NULL, NULL);
}
/**
* 析构
*/
public function __destruct() {
parent::__destruct();
}
/**
* 测试二叉排序树中是否包含参数所指定的值
*
* @param mixed $obj 查找的值.
* @return boolean True 如果存在于二叉排序树中则返回真,否则为假期
*/
public function contains($obj) {
if ($this-isEmpty())
return false;
$diff = $this-compare($obj);
if ($diff == 0) {
return true;
}elseif ($diff0)return $this-getLeft()-contains($obj);
else
return $this-getRight()-contains($obj);
}
/**
* 查找二叉排序树中参数所指定的值的位置
*
* @param mixed $obj 查找的值.
* @return boolean True 如果存在则返回包含此值的对象 , 否则为NULL
*/
public function find($obj) {
if ($this-isEmpty())
return NULL;
$diff = $this-compare($obj);
if ($diff == 0)
return $this-getKey();
elseif ($diff0)return $this-getLeft()-find($obj);
else
return $this-getRight()-find($obj);
}
/**
* 返回二叉排序树中的最小值
* @return mixed 如果存在则返回最小值 , 否则返回NULL
*/
public function findMin() {
if ($this-isEmpty ())
return NULL;
elseif ($this-getLeft()-isEmpty())
return $this-getKey();
else
return $this-getLeft()-findMin();
}
/**
* 返回二叉排序树中的最大值
* @return mixed 如果存在则返回最大值 , 否则返回NULL
*/
public function findMax() {
if ($this-isEmpty ())
return NULL;
elseif ($this-getRight()-isEmpty())
return $this-getKey();
else
return $this-getRight()-findMax();
}
/**
* 给二叉排序树插入指定值
*
* @param mixed $obj 需要插入的值.
* 如果指定的值在树中存在,则返回错误
*/
public function insert($obj) {
if ($this-isEmpty()) {
$this-attachKey($obj);
} else {
$diff = $this-compare($obj);
if ($diff == 0)
die('argu error');
if ($diff0)$this-getLeft()-insert($obj);
else
$this-getRight()-insert($obj);
}
$this-balance();
}
/**
* 从二叉排序树中删除指定的值
*
* @param mixed $obj 需要删除的值.
*/
public function delete($obj) {
if ($this-isEmpty ())
die();
$diff = $this-compare($obj);
if ($diff == 0) {
if (!$this-getLeft()-isEmpty()) {
$max = $this-getLeft()-findMax();
$this-key = $max;
$this-getLeft()-delete($max);
}
elseif (!$this-getRight()-isEmpty()) {
$min = $this-getRight()-findMin();
$this-key = $min;
$this-getRight()-delete($min);
} else
$this-detachKey();
} else if ($diff0)$this-getLeft()-delete($obj);
else
$this-getRight()-delete($obj);
$this-balance();
}
public function compare($obj) {
return $obj - $this-getKey();
}
/**
* Attaches the specified object as the key of this node.
* The node must be initially empty.
*
* @param object IObject $obj The key to attach.
* @exception IllegalOperationException If this node is not empty.
*/
public function attachKey($obj) {
if (!$this-isEmpty())
return false;
$this-key = $obj;
$this-left = new BST();
$this-right = new BST();
}
/**
* Balances this node.
* Does nothing in this class.
*/
protected function balance () {}
/**
* Main program.
*
* @param array $args Command-line arguments.
* @return integer Zero on success; non-zero on failure.
*/
public static function main($args) {
printf("BinarySearchTree main program.\n");
$root = new BST();
foreach ($args as $row) {
$root-insert($row);
}
return $root;
}
}
$root = BST::main(array(50, 3, 10, 5, 100, 56, 78));
echo $root-findMax();
$root-delete(100);
echo $root-findMax();
如何根据制定的数据使用PHP生成一个二叉树假如你所说的二叉树是指这种的话
那么你的数据结构一定要满足一个条件,则每一条数据必须记录好父级的标识
?php
$data = https://www.04ip.com/post/array(
array(
'id' = 1,
'pid' = 0,
'name' = ""新建脑图,
),
array(
'id' = 2,
'pid' = 1,
'name' = "分支主题",
),
array(
'id' = 3,
'pid' = 1,
'name' = "分支主题",
),
);
?
上述二位数组中的 id为2,3的子数组的父级(pid)id均是1,则他们的父级就是id为1的数组
?php
foreach($data as $key=$value){
if( $value['pid'] == '0'){
$parent[] = $value;
unset($data[$key]);
}
}
foreach($parent as $key=$value){
foreach($data as $k=$v){
if( $v['pid'] == $value['id'] ){
$parent[$key]['_child'][] = $v;
unset($data[$k]);
}
}
}
?
通过以上循环过后,对应二叉树关系的数组就可以做出来了
当然上述代码只能进行到二级二叉树,如果想做出无限级二叉树的数组 , 则必须使用到递归函数了
PS:上述代码是网页里手打的,没经过测试,但思路肯定是没问题的哈
php二叉树广度插入数据的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于php实现二叉树、php二叉树广度插入数据的信息别忘了在本站进行查找喔 。

    推荐阅读