正在加载图片...
《数据结构》实验指导/实验六:二叉树的存储及操作 5 操作步骤1-建立二叉链b 输入括号表示: (B(D(G),C(E, F建立二叉链 注意:每个结点只用一个字符来表示,不能含空格 递归算法 先序遍历 先序序列: 中序遍历 中序序列: 后序遍历 后序序列 求高度输出结果: (4)编写窗体中按钮等控件的代码,调用循环顺序队列类,参考如下: BTNodeClass b= new BTNodeCl ass o //二叉链 private void button1 Cl ick ( object sender, EventArgs e) string mystr= text Box1. Text; b. CreateBTNode (mystr) pr ivate void but ton2 CI ick object sender, EventArgs e) text Box2, Text =b PreOrder o pr ivate void but ton 3 CI ick ob ject sender, EventArgs e) text 3. Text b InOrder O private void button cl ick (ob ject sender, EventArgs e text Box4 Text=b Post Order o 管理科学与工程学科/共6页第5页《数据结构》实验指导 / 实验六:二叉树的存储及操作 5 管理科学与工程学科 / 共6页,第5页 (4) 编写窗体中按钮等控件的代码,调用循环顺序队列类,参考如下:
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有