Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _AVL_H_
- #define _AVL_H_
- #include<stdio.h>
- #include<stdlib.h>
- struct NodeAVL {
- int key;
- int echi;
- NodeAVL* left, * right;
- };
- int max(int a, int b);
- int maxPathLength(NodeAVL* p);
- void computeBalanceFactor(NodeAVL* p);
- NodeAVL* leftRot(NodeAVL* root, NodeAVL* p);
- NodeAVL* rightRot(NodeAVL* root, NodeAVL* p);
- NodeAVL* doubleLeftRot(NodeAVL* root, NodeAVL* p);
- NodeAVL* doubleRightRot(NodeAVL* root, NodeAVL* p);
- NodeAVL* balance(NodeAVL* root, NodeAVL* p);
- NodeAVL* insertAVLNode(NodeAVL* root, NodeAVL* p, int x);
- NodeAVL* deleteAVLNode(NodeAVL* root, NodeAVL* p, int x);
- void displayAVLTree(NodeAVL* p, int level);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement