Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- struct Element {
- Element* RightSon = nullptr;
- Element* LeftSon = nullptr;
- int value;
- Element(int x);
- ~Element();
- };
- class Tree {
- private:
- Element* Head = nullptr;
- public:
- Tree();
- ~Tree();
- void Add(int value);
- int GetMaxElementCount();
- int GetHeight(Element* node);
- bool isBalanced(Element* node);
- bool isBalanced();
- bool FindDivEL(Element* node, int& result);
- bool FindDivEL(int& result);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement