📄 avltree.h
字号:
// AVLTree.h: interface for the AVLTree class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_AVLTREE_H__94E17131_4EBA_4958_9F1F_4324184AE424__INCLUDED_)
#define AFX_AVLTREE_H__94E17131_4EBA_4958_9F1F_4324184AE424__INCLUDED_
#include "AVLNode.h"
#include <iostream.h>
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class AVLTree
{
public:
bool Insert(ListNode vld);
int Hight(AVLNode* t);
void RightBalance(AVLNode* &tree, int &taller);
void LeftBalance(AVLNode* &tree, int &taller);
void RotateRight(AVLNode* tree, AVLNode* &newtree);
void RotateLeft(AVLNode* tree, AVLNode* &newtree);
bool Insert(AVLNode* &tree, ListNode vld, int &taller);
AVLNode* root;
AVLTree();
virtual ~AVLTree();
};
#endif // !defined(AFX_AVLTREE_H__94E17131_4EBA_4958_9F1F_4324184AE424__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -