📄 lxbst.h
字号:
// lxbst.h: interface for the lxbst class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_LXBST_H__3C60B776_A398_49C2_9C4C_0D5B7112B01D__INCLUDED_)
#define AFX_LXBST_H__3C60B776_A398_49C2_9C4C_0D5B7112B01D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "lxbinnode.h"
#include "lxlqueue.h"
class lxbst
{
public:
void count();
void printonline();
int higth();
void bacorderprint();
void midorderprint();
void preorderprint();
void print()const;
int size();
bool find(const int&,int&);
bool removeany(int&);
bool remove(const int&,int&);
bool insert(const int&);
void clear();
lxbst();
virtual ~lxbst();
private:
int counthelp(lxbinnode*);
int higthhelp(lxbinnode*);
void bacorder(lxbinnode*);
void midorder(lxbinnode*);
void preorder(lxbinnode *);
void printhelp(lxbinnode*,int)const;
bool findhelp(lxbinnode*,const int&,int&);
lxbinnode* removehelp(lxbinnode*,const int&,lxbinnode*&);
lxbinnode* deletemin(lxbinnode*,lxbinnode*&);
lxbinnode* inserthelp(lxbinnode*,const int&);
void clearhelp(lxbinnode*);
int nodecount;
lxbinnode* root;
};
#endif // !defined(AFX_LXBST_H__3C60B776_A398_49C2_9C4C_0D5B7112B01D__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -