跪求二叉平衡树的设计与实现的C语言源代码!!

来源:百度知道 编辑:UC知道 时间:2024/07/04 05:34:59
用二叉链表作存储结构
(1)以回车(‘\n’)为输入结束标志,输入数列L,分别生成
一棵二叉排序树T和平衡的二叉排序树BT ;
(2)对二叉排序树T作中序遍历,输出结果;
(3)输入元素x,查找二叉排序树T:若存在含x的结点,
则删除该 结点,并作中序遍历(执行操作2);否则
输出相关信息;
(4)分别计算T、BT的查找成功的平均查找长度,输出
结果;

有我满意的一定追加100分 也可以去http://zhidao.baidu.com/question/36185039.html?quesup1回答

建立二叉树后,依次读入待排序的数据插入到二叉树中,树建立完成后
一次中序遍历输出不就可以了吗

相关函数/类:
CreateFontIndirect CString CFont DeleteObject CWnd CDC CFontDialog SetTextColor CWinApp FindWindow CRect ShowWindow CDialog DestroyIcon LoadIcon CDataExchange IsIconic CPaintDC SendMessage GetSystemMetrics GetClientRect DrawIcon DestroyWindow ClipCursor GetWindowRect RegCreateKeyEx RegFlushKey RegCloseKey RegOpenKeyEx RegDeleteKey RegDeleteValue RegQueryValueEx RegQueryInfoKey CPoint CSize RegSetValueEx CBitmap CRgn GetObject CreateCompatibleDC SelectObject GetPixel CreateRectRgn CombineRgn SetWindowRgn MoveWindow SetCursorPos LoadBitmap CWindowDC SetTimer GetModuleFileName ShowCursor RegisterHotKey SystemParametersInfo SetWindowPos BitBlt UnregisterHotKey CButton SetBkMode GetSysColor GetWindowText DrawText GetDC CreateCompatibleBitmap StretchBlt ReleaseDC SetBkColor CreateBitmap UpdateWindow