⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.cs

📁 数据结构排序部分的二叉树排序
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;

namespace binarytreesort
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        public  binarysorttree bst;
        private void button1_Click(object sender, EventArgs e)
        {
            int[] Data = new int[10] { 1, 5, 3, 8,50 ,5,9,7,3,10};
            bst = new binarysorttree(Data);
            ArrayList Array = new ArrayList();
            binarysorttreenode boot = new binarysorttreenode();
            boot = bst.ROOT;
            bst.inordertraverse(ref boot  , ref Array);
            int i = 0;
            while (i < Array.Count)
            {
                richTextBox1.AppendText(Array[i].ToString()+"\n");
                i++;
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            richTextBox2.Clear();
            ArrayList Array = new ArrayList();
            binarysorttreenode boot = new binarysorttreenode();
            boot = bst.ROOT;
            bst.delete(ref boot,  Convert .ToInt16 (this.textBox1.Text.ToString()));
            bst.inordertraverse(ref boot, ref Array);
            int i = 0;
            while (i < Array.Count)
            {
                richTextBox2.AppendText(Array[i].ToString() + "\n");
                i++;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -