mirror of
https://github.com/CodePanda66/CSPostgraduate-408.git
synced 2023-05-21 21:49:33 +08:00
🎉 add AVL
This commit is contained in:
37
DataStructure/DS_4_TreeAndBinaryTree/DS_4_8_AVL.cpp
Normal file
37
DataStructure/DS_4_TreeAndBinaryTree/DS_4_8_AVL.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// Created by Kim Yang on 2020/9/4.
|
||||
// Copyright (c) Kim Yang All rights reserved.
|
||||
//
|
||||
#include <stdio.h>
|
||||
|
||||
/**定义模块**/
|
||||
typedef struct AVLNode{
|
||||
int key; //数据域
|
||||
int balance;//平衡因子
|
||||
struct AVLNode *lchild,*rchild;
|
||||
}AVLNode,*AVLTree;
|
||||
|
||||
/**定义模块**/
|
||||
|
||||
|
||||
/**实现模块**/
|
||||
//坐等填坑
|
||||
|
||||
/**实现模块**/
|
||||
|
||||
|
||||
/**测试模块**/
|
||||
|
||||
void testModule() {
|
||||
printf("开始测试!\n");
|
||||
|
||||
//坐等填坑
|
||||
|
||||
printf("结束测试!\n");
|
||||
}
|
||||
|
||||
/**测试模块**/
|
||||
int main() {
|
||||
testModule();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user