二叉树节点的插入和查找.docVIP

  • 1
  • 0
  • 约3.4千字
  • 约 9页
  • 2019-09-27 发布于江苏
  • 举报
丹丹借 数据结构 二叉树节点的插入和查找 #include stdio.h #include stdlib.h typedef int elemtype; typedef struct Node { elemtype data; struct Node *Lchild; struct Node *Rchild; }TreeNode; typedef TreeNode *bt; Search_data(TreeNode *t,TreeNode **p,TreeNode **q, elemtype x) //查找函数 { int flag=0; *p=NULL; *q=t; while(*q) { if (x(*q)-data) { *p=*q; *q=(*q)-Rchild; } else { if (x(*q)-data) { *p=*q;

文档评论(0)

1亿VIP精品文档

相关文档