commit 9864a0b3ef49d7720187f41d8f8394e3dfd59585
parent ab345d5facddadb1501992becefaa2b316250b6e
Author: Plat <plat@stellar-nexus.ru>
Date: Wed, 5 Nov 2025 19:54:12 +0000
Removed deprecated functionality
Diffstat:
| D | help.txt | | | 42 | ------------------------------------------ |
| M | rb.c | | | 72 | ------------------------------------------------------------------------ |
2 files changed, 0 insertions(+), 114 deletions(-)
diff --git a/help.txt b/help.txt
@@ -1,42 +0,0 @@
-#include <iostream>
-
-
-#define MAX(A, B) ((A) > (B) ? (A) : (B))
-#define MIN(A, B) ((A) < (B) ? (A) : (B))
-#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
-#define LENGTH(X) (sizeof(X) / sizeof(X)[0])
-
-
-class BinaryTree {
-public:
-
- struct Node {
- int val;
- Node *right;
- Node *left;
- };
-
- Node *tree;
- Node *root = 0;
-
-
- BinaryTree() {
- const int s = pow(10, 6);
- tree = (Node*)malloc(sizeof(Node) * s);
- }
-
-
- void add(int val) {
- if (root == 0) {
-
- }
- }
-
-
-};
-
-
-
-int main() {
-
-}
diff --git a/rb.c b/rb.c
@@ -32,78 +32,6 @@ add(Node *root, int val)
return balance(root);
}
-
-Node *
-parse_pre(Node *root)
-{
- int val = VALUE(root);
-
- // do smth with val
-
- if (root->left) parse_pre(root->left);
- if (root->right) parse_pre(root->right);
-
- return NULL;
-}
-
-
-Node *
-parse_post(Node *root)
-{
- if (root->left) parse_post(root->left);
- if (root->right) parse_post(root->right);
-
- int val = VALUE(root);
-
- // do smth with val
-
- return NULL;
-}
-
-
-Node *
-parse_inf(Node *root)
-{
- if (root->left) parse_inf(root->left);
-
- int val = VALUE(root);
-
- // do smth with val
-
- if (root->right) parse_inf(root->right);
-
- return NULL;
-}
-
-
-int
-get_height(Node *root)
-{
- int r, l;
-
- if (!root)
- return 0;
-
- l = get_height(root->left) + 1;
- r = get_height(root->right) + 1;
-
- if (l > r) {
- return l;
- }
-
- return r;
-}
-
-inline int
-get_balance_factor(Node *root)
-{
- if (!root)
- return 0;
-
- return get_height(root->left) - get_height(root->right);
-}
-
-
Node *
right_turn(Node *root)
{